public function __destruct() { if (count($this->nextData) > 0) { $data = serialize($this->nextData); $this->sessionProvider->save($this->sessionKey, $data); } }
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; } }