/**
  * Initializes the myUser object.
  *
  * @param sfEventDispatcher $dispatcher The event dispatcher object
  * @param sfStorage $storage The session storage object
  * @param array $options An array of options
  */
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     parent::initialize($dispatcher, $storage, $options);
     if (!$this->isAuthenticated()) {
         $this->_user_id = null;
     }
 }
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     parent::initialize($dispatcher, $storage, $options);
     if ($this->user === null && $storage instanceof policatSessionStorage && !$this->human() && !$this->getAttribute(self::SESSION_WIDGETVAL_ON)) {
         // if user is not logged in or session is needed for other stuff forget the session cookie for better caching
         $request = sfContext::getInstance()->getRequest();
         if ($request instanceof sfWebRequest) {
             if ($request->isMethod('post')) {
                 return;
                 // never drop session on POST request
             }
         }
         $storage->dropSession();
     }
 }
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     // disable timeout
     $options['timeout'] = false;
     parent::initialize($dispatcher, $storage, $options);
 }
Beispiel #4
0
 /**
  * Initializes the sfGuardSecurityUser object.
  *
  * @param sfEventDispatcher $dispatcher The event dispatcher object
  * @param sfStorage $storage The session storage object
  * @param array $options An array of options
  */
 public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array())
 {
     parent::initialize($dispatcher, $storage, $options);
     $this->setCulture('hu');
 }