Package | system.base |
---|---|
Inheritance | interface IWebUser |
Subclasses | CWebUser |
Since | 1.0 |
Source Code | framework/base/interfaces.php |
Method | Description | Defined By |
---|---|---|
checkAccess() | Performs access check for this user. | IWebUser |
getId() | Returns a value that uniquely represents the identity. | IWebUser |
getIsGuest() | Returns a value indicating whether the user is a guest (not authenticated). | IWebUser |
getName() | Returns the display name for the identity (e.g. username). | IWebUser |
loginRequired() | Redirects the user browser to the login page. | IWebUser |
abstract public boolean checkAccess(string $operation, array $params=array (
))
| ||
$operation | string | the name of the operation that need access check. |
$params | array | name-value pairs that would be passed to business rules associated with the tasks and roles assigned to the user. |
{return} | boolean | whether the operations can be performed by this user. |
public function checkAccess($operation,$params=array());
Performs access check for this user.
abstract public mixed getId()
| ||
{return} | mixed | a value that uniquely represents the identity (e.g. primary key value). |
Returns a value that uniquely represents the identity.
abstract public boolean getIsGuest()
| ||
{return} | boolean | whether the user is a guest (not authenticated) |
Returns a value indicating whether the user is a guest (not authenticated).
abstract public string getName()
| ||
{return} | string | the display name for the identity. |
Returns the display name for the identity (e.g. username).
abstract public void loginRequired()
|
Redirects the user browser to the login page. Before the redirection, the current URL (if it's not an AJAX url) will be kept in returnUrl so that the user browser may be redirected back to the current page after successful login. Make sure you set loginUrl so that the user browser can be redirected to the specified login URL after calling this method. After calling this method, the current request processing will be terminated.
Signup or Login in order to comment.