Esempio n. 1
0
 /**
  * Destroy the session and optionally specify $regenerate = true
  * to regenerate a new session id.
  *
  * @param boolean $regenerate
  * @throws \Exception
  * @return boolean
  */
 public function destroy($regenerate = false)
 {
     $this->instance->unlock();
     $result = $this->instance->destroy();
     if ($regenerate == true) {
         session_regenerate_id(true);
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * Destroy an authentication session.
  *
  * @return boolean
  */
 public function logout()
 {
     if ($this->instance instanceof \Skinny\Storage) {
         if ($this->instance->isLocked()) {
             $this->instance->unlock();
         }
         $this->instance->destroy();
     }
     return false;
 }