示例#1
0
 /**
  * Logs the user out.
  *
  * @access  public
  */
 public function logout()
 {
     $this->session->regenerateId();
     $this->session->remove($this->authKey);
     $this->response->deleteCookie($this->authKey, $this->cookieOptions);
     $this->user = null;
 }
示例#2
0
 /**
  * Destroys the session.
  *
  * @access  public
  */
 public function destroy()
 {
     if (!$this->started) {
         throw new LogicException(vsprintf("%s(): The session has not been started yet.", [__METHOD__]));
     }
     $this->store->delete($this->sessionId);
     $this->response->deleteCookie($this->cookieName, $this->cookieOptions);
     $this->destroyed = true;
 }