Destroy an authentication session.

@param array $identity (optional) - the users account details.
@return boolean
166404
public function login(array $identity = array())
    {
        if ($this->instance instanceof \Phavour\Session\Storage) {
            if ($this->instance->isLocked()) {
                $this->instance->unlock();
            }
            $this->instance->set('identity', $identity);
            $this->instance->set('roles', array());
            $this->instance->lock();
            return true;
        }

        return false;
    }
1184558
public function expire()
    {
        if (!isset($_SESSION[$this->_index]) || !is_array($_SESSION[$this->_index]) || empty($_SESSION[$this->_index])) {
            return;
        }

        unset($_SESSION[$this->_index]);

        // Calling session_destroy triggers the Session::destroy function which removes the entire session
        // from the database. To prevent logout issues between functionality that relies on $_SESSION, such
        // as Symphony authentication or the Members extension, only delete the $_SESSION if it empty!
        if (empty($_SESSION)) {
            session_destroy();
        }
    }
1034627
function destroy( $id )
	{
		$this->id_format($id);
		$params = array();
		$params['id'] = $id;
		return $this->oauth->post( 'statuses/destroy',  $params );
	}
1172918
public function destroy($id)
      {
        Permission::destroy($id);
        \Session::flash('flash_message', 'Permission deleted!');
        return \Redirect::route('admin.permissions.index', [
          ])->withMessage(trans('acl::permission.permissions-controller-successfully_deleted'));
        }
779906
public static function logout($id = null)
    {
        if (!$id) $id = \Zend_Auth::getInstance()->getIdentity();
        if (!$id) return;
        self::getDbConnection()->executeQuery("DELETE FROM users_auth WHERE user_id=".$id['user_id']." and uniq='".$id['uniq']."'");
        \Zend_Auth::getInstance()->clearIdentity();
		\Zend_Session::forgetMe();		
    }
358265
public function destroy($id)
    {
        $this->roles->findOrFail($id)->delete();
        return \Redirect::route('admin.roles.index', [
         ])->withMessage(trans('acl::role.roles-controller-successfully_deleted'));
    }
970056
public function destroy($id)
    {
        $user = $this->user->findOrFail($id);

        if($user->delete()) return response()->json(['status' => 'ok']);

        return response()->json(['status' => 'failed']);
    }
58104
public function deleteSession(Request $request, $id)
    {
        $session = $this->getSessionRepository()->find($id);

        if (null === $session) {
            $this->app->abort(404, 'Unknown session');
        }

        if (null === $session->getUser()) {
            $this->app->abort(403, 'Unauthorized');
        }

        if ($session->getUser()->getId() !== $this->getAuthenticatedUser()->getId()) {
            $this->app->abort(403, 'Unauthorized');
        }

        $manager = $this->getEntityManager();
        $manager->remove($session);
        $manager->flush();

        if ($request->isXmlHttpRequest()) {
            return $this->app->json([
                'success' => true,
                'session_id' => $id
            ]);
        }

        return $this->app->redirectPath('account_sessions');
    }
525697
public function destroy(string $id) : bool
    {
        static $stmt;
        if (!isset($stmt)) {
            $stmt = $this->pdo->prepare("DELETE FROM cesession_session WHERE id = :id");
        }
        $stmt->execute(compact('id'));
        return ($affectedRows = $stmt->rowCount()) && $affectedRows;
    }
296459
public function login($identity)
    {
        if ($this->needRegenerate) {
            session_regenerate_id(true);
        }
        foreach ($identity as $name => $val) {
            $this->sessionData[$name] = $val;
        }
        $lifetime = ini_get('session.cookie_lifetime');
        $this->sessionData[self::REGENERATE_AFTER] = time() + $lifetime - min($lifetime*0.2, 300);
        $this->getSession()->set($this->sessionKey, $this->sessionData);
    }
182591
public function destroy(Session $session)
    {
        $session->delete();

        return intend([
            'back' => true,
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/auth::common.session'), 'identifier' => $session->getKey()])],
        ]);
    }
1214981
public function logout()
		{

			// Am I authenticated?
			if ($this->isAuthenticated() == false) {

				// Cannot logout!
				return false;

			}

			// Destroy my session
			$this->_authenticated = false;
			unset($_SESSION[self::$_sessionPrefix . $this->name]);
			$this->_user = null;
			return true;

		}
672330
public function login($identity,$remember=false){
        $this->identity = $identity;
        $this->saveLoginSession();
        if($remember){
            return $this->saveLoginCookie();
        }
        return true;
    }
1117564
public function destroySession($id)
	{
		$this->getDbConnection()->createCommand()
			->delete($this->sessionTableName,'id=:id',array(':id'=>$id));
		return true;
	}
962841
public function _destroy($id) {
        ORM::for_table($this->sessions_table)->raw_execute("DELETE FROM " . $this->sessions_table . " WHERE id = :id", ['id' => $id]);
    }
318389
public function destroy($id)
    {
        // Note: Do NOT delete session data in $_SESSION variable or
        // session cookie here as this method is also called via
        // session_regenerate_id(true)

        // Delete session file on disk
        $file = $this->getPathForSessionId($id);
        if (file_exists($file)) {
            unlink($file);
        }

        return true;
    }
147414
protected function parseIdentity($identity)
    {
        // If is an array, remove password, remember and then
        // transforms it into a string.
        if(is_array($identity)){
            unset($identity['password']);
            unset($identity['remember']);
            $identity = serialize($identity);
        }

        return $identity;
    }