public static function logout() { session_regenerate_id(); s::remove('auth.created'); s::remove('auth.updated'); s::remove('auth.key'); s::remove('auth.secret'); s::remove('auth.username'); s::remove('auth.ip'); s::remove('auth.ua'); cookie::remove('key'); }
public function logout() { if ($this->isCurrent()) { cookie::remove('key'); } $this->update(array('token' => null)); }
public static function unauthorize() { s::remove('kirby_auth_secret'); s::remove('kirby_auth_username'); cookie::remove('kirby_auth'); }
/** * Destroys a session * * <code> * * s::start(); * // do whatever you want with the session now * * s::destroy(); * // everything stored in the session will be deleted * * </code> * */ public static function destroy() { if (!static::$started) { return false; } $_SESSION = array(); cookie::remove(static::$name); static::$started = false; return session_destroy(); }