Class \Prado\Security\TUser
TUser implements basic user functionality for a Prado application. To get the name of the user, use \Prado\Security\getName property. The property \Prado\Security\getIsGuest tells if the user a guest/anonymous user. To obtain or test the roles that the user is in, use property \Prado\Security\getRoles and call isInRole(), respectively.
TUser is meant to be used together with IUserManager.
Class hierarchy
- \Prado\Security\TUser implements IUser
- \Prado\TComponent
Since: 3.0
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
getState(string $key[, null|mixed $defaultValue = null ]) : mixed
Returns the value of a variable that is stored in user session.
This function is designed to be used by TUser descendant classes who want to store additional user information in user session. A variable, if stored in user session using setState can be retrieved back using this function. |
protected
|
setState(string $key, mixed $value[, null|mixed $defaultValue = null ]) : mixed
Stores a variable in user session.
This function is designed to be used by TUser descendant classes who want to store additional user information in user session. By storing a variable using this function, the variable may be retrieved back later using getState. The variable will be persistent across page requests during a user session. |
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |