PiiWebUser
| Package | pii.core.user |
|---|---|
| Inheritance | class PiiWebUser » CWebUser » CApplicationComponent » CComponent |
| Implements | IWebUser, IApplicationComponent |
| Since | 2.0 |
| Version | $Id$ |
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| allowAutoLogin | boolean | whether to enable cookie-based login. | CWebUser |
| behaviors | array | the behaviors that should be attached to this component. | CApplicationComponent |
| guestName | string | the name for a guest user. | CWebUser |
| id | mixed | the unique identifier for the user. | CWebUser |
| identityCookie | array | the property values (in name-value pairs) used to initialize the identity cookie. | CWebUser |
| isGuest | boolean | whether the current application user is a guest. | CWebUser |
| isInitialized | boolean | whether this application component has been initialized (i. | CApplicationComponent |
| loginUrl | string|array | the URL for login. | CWebUser |
| model | mixed | Get database record for the current logged in user. | PiiWebUser |
| name | string | Returns the unique identifier for the user (e.g. username). | CWebUser |
| profile | PiiWebUser | ||
| returnUrl | string | Returns the URL that the user should be redirected to after successful login. | CWebUser |
| stateKeyPrefix | string | a prefix for the name of the session variables storing user session data. | CWebUser |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __call() | Calls the named method which is not a class method. | CComponent |
| __get() | PHP magic method. | CWebUser |
| __isset() | PHP magic method. | CWebUser |
| __set() | PHP magic method. | CWebUser |
| __unset() | PHP magic method. | CWebUser |
| asa() | Returns the named behavior object. | CComponent |
| attachBehavior() | Attaches a behavior to this component. | CComponent |
| attachBehaviors() | Attaches a list of behaviors to the component. | CComponent |
| attachEventHandler() | Attaches an event handler to an event. | CComponent |
| canGetProperty() | Determines whether a property can be read. | CComponent |
| canSetProperty() | Determines whether a property can be set. | CComponent |
| checkAccess() | Performs access check for this user. | CWebUser |
| clearStates() | Clears all user identity information from persistent storage. | CWebUser |
| detachBehavior() | Detaches a behavior from the component. | CComponent |
| detachBehaviors() | Detaches all behaviors from the component. | CComponent |
| detachEventHandler() | Detaches an existing event handler. | CComponent |
| disableBehavior() | Disables an attached behavior. | CComponent |
| disableBehaviors() | Disables all behaviors attached to this component. | CComponent |
| enableBehavior() | Enables an attached behavior. | CComponent |
| enableBehaviors() | Enables all behaviors attached to this component. | CComponent |
| getEventHandlers() | Returns the list of attached event handlers for an event. | CComponent |
| getFlash() | Returns a flash message. | CWebUser |
| getId() | CWebUser | |
| getIsGuest() | CWebUser | |
| getIsInitialized() | CApplicationComponent | |
| getModel() | Get database record for the current logged in user. | PiiWebUser |
| getName() | Returns the unique identifier for the user (e.g. username). | CWebUser |
| getProfile() | PiiWebUser | |
| getReturnUrl() | Returns the URL that the user should be redirected to after successful login. | CWebUser |
| getState() | Returns the value of a variable that is stored in user session. | CWebUser |
| getStateKeyPrefix() | CWebUser | |
| hasEvent() | Determines whether an event is defined. | CComponent |
| hasEventHandler() | Checks whether the named event has attached handlers. | CComponent |
| hasFlash() | CWebUser | |
| hasProperty() | Determines whether a property is defined. | CComponent |
| hasState() | Returns a value indicating whether there is a state of the specified name. | CWebUser |
| init() | Initializes the application component. | CWebUser |
| login() | Logs in a user. | CWebUser |
| loginRequired() | Redirects the user browser to the login page. | CWebUser |
| logout() | Logs out the current user. | CWebUser |
| raiseEvent() | Raises an event. | CComponent |
| setFlash() | Stores a flash message. | CWebUser |
| setId() | CWebUser | |
| setName() | Sets the unique identifier for the user (e.g. username). | CWebUser |
| setReturnUrl() | CWebUser | |
| setState() | Stores a variable in user session. | CWebUser |
| setStateKeyPrefix() | CWebUser |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| changeIdentity() | Changes the current user with the specified identity information. | CWebUser |
| createIdentityCookie() | Creates a cookie to store identity information. | CWebUser |
| loadIdentityStates() | Loads identity states from an array and saves them to persistent storage. | CWebUser |
| restoreFromCookie() | Populates the current user object with the information obtained from cookie. | CWebUser |
| saveIdentityStates() | Retrieves identity states from persistent storage and saves them as an array. | CWebUser |
| saveToCookie() | Saves necessary user data into a cookie. | CWebUser |
| updateFlash() | Updates the internal counters for flash messages. | CWebUser |
Property Details
model
property
read-only
public mixed getModel(mixed $status=NULL)
Get database record for the current logged in user.
profile
property
read-only
public void getProfile()
Method Details
getModel()
method
|
public mixed getModel(mixed $status=NULL)
| ||
| $status | mixed | $status if not null, user must have this status or null is returned |
| {return} | mixed | PiiUser record of current user or null if not found. |
Get database record for the current logged in user.
getProfile()
method
|
public void getProfile()
|