Beispiel #1
0
 /**
  * 
  */
 public function initialize(coreSessionStorage $storage, $options = array())
 {
     parent::initialize($storage, $options);
     // sign in unauthenticated user if a "remember me" cookie exists
     if (!$this->isAuthenticated()) {
         if ($cookieData = coreContext::getInstance()->getRequest()->getCookie(self::COOKIE_NAME)) {
             $value = unserialize(base64_decode($cookieData));
             $username = $value[0];
             $saltyPassword = $value[1];
             // sign in user if user is valid and password from cookie matches the one in database
             $user = UsersPeer::getUser($username);
             if ($user && $saltyPassword == $user['password']) {
                 $this->signIn($user);
             }
         }
     }
     // session duration preferences
     $this->localPrefs = new LocalPrefs($this);
 }
Beispiel #2
0
 public function initialize(coreSessionStorage $storage, $options = array())
 {
     parent::initialize($storage, $options);
 }