public function logout() { s::restart(); if ($user = panel()->site()->user()) { $user->logout(); } go(panel()->urls()->login()); }
protected function tearDown() { s::restart(); // clean all triggers kirby::$triggered = array(); kirby::$hooks = array(); $this->removeContent(); $this->removeAccounts(); }
protected static function kill() { self::$user = null; // overwrite the token $token = str::random(); // the cookie is valid for 24 hours cookie::set('authFrontend', $token, 60 * 60 * 24); // restart the session s::restart(); }
function logout() { // overwrite the token $token = str::random(); // the cookie is valid for 24 hours cookie::set('auth', $token, 60 * 60 * 24); // restart the session s::restart(); // go to the homepage go(url()); }
protected function tearDown() { s::restart(); $this->removeContent(); $this->removeAccounts(); }