Пример #1
0
 public function __destruct()
 {
     if (count($this->nextData) > 0) {
         $data = serialize($this->nextData);
         $this->sessionProvider->save($this->sessionKey, $data);
     }
 }
Пример #2
0
 public function login($login, $password)
 {
     if (!$this->enabled) {
         return false;
     }
     if (!$this->isLoggedIn()) {
         $this->loginUserByLoginAndPassword($login, $password);
         if ($this->isLoggedIn()) {
             $this->sessionProvider->save($this->sessionKey, $this->userId);
             return true;
         } else {
             return false;
         }
     } else {
         return true;
     }
 }