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