public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array()) { parent::initialize($dispatcher, $storage, $options); $adminUserId = Doctrine::getTable('AdminUser')->find($this->getId()); if (!$adminUserId) { $this->logout(); } }
/** * Initializes the current user. * * @see sfBasicSecurityUser */ public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array()) { parent::initialize($dispatcher, $storage, $options); if ($this->getMemberId() && $this->isTimedOut()) { $this->getAttributeHolder()->removeNamespace('opSecurityUser'); } $request = sfContext::getInstance()->getRequest(); $authMode = $request->getUrlParameter('authMode'); if ($authMode) { $this->setCurrentAuthMode($authMode); } $this->createAuthAdapter($this->getCurrentAuthMode()); }