Cuppa Documentation

Find information related with: installation, user interface, best practices, improve and extend de functionalities, front-end integration and more.
Users

setSession($access_type = "admin_login", $user = "", $password = "" )

$access_type: super_admin_login, admin_login, site_login, super
$user: username, email

$cuppa->user->setSession('site_login', 'tufik2', 'my_password'); // valid if the user have permissions to login in the front-end 'site_login', create the user session vars and return 1 or 0

setSessionById($access_type = "admin_login", $id )

$cuppa->user->setSessionById('site_login', '3'); // create a session by id

setVar($name, $value )

$cuppa->user->setVar('my_var', 'value'); / / set Session var with the value specify

getVar($name )

$cuppa->user->getVar('my_var'); // return value in Session with the name specify

destroy($redirect = "", $create_unregistered_user = true, $user_group_name = "Unregistered" )

$cuppa->user->destroy(); // clear all user data