Authenticate user
This method can
- authenticate user throught authentification process
- load already authenticated user in current session (or SSO)
- disconnect user
static void
authenticate
([array $params = array()])
-
array
$params: : indexed array of authentification parameters (default : nothing) Accepted array keys are :
- authenticate : boolean : default true if disconnect is not set
- disconnect : boolean : default false
- login : string : user login to authenticate
- password : string : user password to authenticate
- remember : boolean : default false
- tokenName : string
- token : string
- type : string : type of authentification (admin|frontend) : default APPLICATION_USER_TYPE contant
- ... and any parameter needed by authentifications processes handled by modules
Test auto login through cookie
static boolean
autoLoginSucceeded
()
Check a session token value for a given token name
static boolean
checkToken
( $name, $token, string $name,, string $token,)
-
string
$name,: token name to check
-
string
$token,: token value to check
-
$name
-
$token
Delete current session datas
static void
deleteSession
([boolean $force = false])
-
boolean
$force: : force removing persistent session (default false)
Force a token expiration
static boolean
expireToken
( $name, string $name,)
-
string
$name,: token name to expire
-
$name
Get authentification result
static Zend_Auth_Result
getAuthResult
()
Get autologin cookie name
static string
getAutoLoginCookieName
()
Get Bookmark
static integer
getBookmark
()
Get current context hash (usually used for cache)
static string
getContextHash
([ $datas = array()], array $datas,)
-
array
$datas,: additionnal datas to use for cache
-
$datas
Get all JS locales for current user (in current language)
static string
getJSLocales
()
Get Page ID
static integer
getPageID
()
Get permanent status for the session
static boolean
getPermanent
()
Get the number of records per page
static integer
getRecordsPerPage
()
Get current session infos
static array
getSessionInfos
()
Gets session variable with name
static void
getSessionVar
(string $name)
Get a unique session token value for given token name
static string
getToken
( $name, string $name,)
-
string
$name,: token name to get value
-
$name
Get user object
static user
getUser
()
Get user DB ID
static integer
getUserID
()
Start session and load existant user if any
static void
init
()
Set Bookmark
static void
setBookmark
(integer $bookmark)
Sets a cookie given at least its name If value is empty, deletes cookie
static void
setCookie
( $name, [ $value = false], [ $expire = false], string $name,, string $value,, int $expire,)
-
string
$name,: cookie name
-
string
$value,: the value to store
-
int
$expire,: represents time in which cookie will expire if not set, expires at the end of the session
-
$name
-
$value
-
$expire
Set Page
static
void
setPage
(
&$page,
CMS_page $page)
Set The number of records per page
static void
setRecordsPerPage
(integer $howMany)
Sets session variable
static void
setSessionVar
(string $name, mixed $value)
-
string
$name
-
mixed
$value
Check if a session token is expired for a given token name
static boolean
tokenIsExpired
( $name, string $name,)
-
string
$name,: token name to check
-
$name
Constructor overriding - make sure that a developer cannot instantiate
CMS_session
__construct
()
Clean old sessions datas
void
_cleanSessions
()
Inherited Methods
Inherited From CMS_grandFather
CMS_grandFather::autoload()
CMS_grandFather::hasError()
CMS_grandFather::log()
CMS_grandFather::PHPErrorHandler()
CMS_grandFather::raiseError()
CMS_grandFather::setDebug()
CMS_grandFather::setLog()
CMS_grandFather::_raiseError()
CMS_grandFather::__call()