/**
* 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;
}
}