init() public method

public init ( )
Exemplo n.º 1
0
 /**
  * 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;
     }
 }
Exemplo n.º 2
0
 /**
  * Initializes the component.
  */
 public function init()
 {
     parent::init();
     $this->setIsAdmin(in_array($this->name, $this->admins));
 }
Exemplo n.º 3
0
 /**
  * Initializes the component.
  */
 public function init()
 {
     parent::init();
     $this->setIsAdmin(in_array($this->name, Yii::app()->authManager->admins));
 }