예제 #1
0
 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();
     }
 }
예제 #2
0
 /**
  * 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());
 }