WebUser::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        $this->updateLastActiveAt();
    }

Usage Example

 /**
  * Actions to be taken after logging in.
  * Overloads the parent method in order to mark superusers.
  * @param boolean whether the login is based on cookie.
  */
 public function afterLogin($fromCookie)
 {
     parent::init($fromCookie);
     // Mark the user as a superuser if necessary.
     if (Rights::getAuthorizer()->isSuperuser($this->getId()) === true) {
         $this->isSuperuser = true;
     }
 }
All Usage Examples Of WebUser::init