IUserSession
in
User session
Tags
Table of Contents
Methods
- getImpersonatingUserID() : string|null
- get getImpersonatingUserID
- getUser() : IUser|null
- get the current active user
- isLoggedIn() : bool
- Checks whether the user is logged in
- login() : bool
- Do a user login
- logout() : void
- Logs the user out including all the session data Logout, destroys session
- setImpersonatingUserID() : void
- set setImpersonatingUserID
- setUser() : mixed
- set the currently active user
- setVolatileActiveUser() : void
- Temporarily set the currently active user without persisting in the session
Methods
getImpersonatingUserID()
get getImpersonatingUserID
public
getImpersonatingUserID() : string|null
Tags
Return values
string|nullgetUser()
get the current active user
public
getUser() : IUser|null
Tags
Return values
IUser|null —Current user, otherwise null
isLoggedIn()
Checks whether the user is logged in
public
isLoggedIn() : bool
Tags
Return values
bool —if logged in
login()
Do a user login
public
login(string $uid, string $password) : bool
Parameters
- $uid : string
-
the username
- $password : string
-
the password
Tags
Return values
bool —true if successful
logout()
Logs the user out including all the session data Logout, destroys session
public
logout() : void
Tags
setImpersonatingUserID()
set setImpersonatingUserID
public
setImpersonatingUserID([bool $useCurrentUser = true ]) : void
Parameters
- $useCurrentUser : bool = true
Tags
setUser()
set the currently active user
public
setUser(IUser|null $user) : mixed
Parameters
- $user : IUser|null
Tags
setVolatileActiveUser()
Temporarily set the currently active user without persisting in the session
public
setVolatileActiveUser(IUser|null $user) : void
Parameters
- $user : IUser|null