IUserSession
User session
Tags
Table of Contents
- 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
Methods
getImpersonatingUserID()
get getImpersonatingUserID
public
getImpersonatingUserID() : string|null
Tags
Return values
string|null —getUser()
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 $user, string $password) : bool
Parameters
- $user : 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