From 59b5a0549635aa5c8320707cec75612746debdd0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 30 Oct 2009 09:32:18 -0700 Subject: Rename the login helper to auth. Create a login and logout helper function to allow for programmically login in and out. --- modules/gallery/controllers/logout.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'modules/gallery/controllers/logout.php') diff --git a/modules/gallery/controllers/logout.php b/modules/gallery/controllers/logout.php index 1b0364fd..2b93655d 100644 --- a/modules/gallery/controllers/logout.php +++ b/modules/gallery/controllers/logout.php @@ -19,17 +19,7 @@ */ class Logout_Controller extends Controller { public function index() { - $user = identity::active_user(); - if (!$user->guest) { - try { - Session::instance()->destroy(); - } catch (Exception $e) { - Kohana::log("error", $e); - } - module::event("user_logout", $user); - } - log::info("user", t("User %name logged out", array("name" => $user->name)), - html::anchor("user/$user->id", html::clean($user->name))); + auth::logout(); if ($continue_url = $this->input->get("continue")) { $item = url::get_item_from_uri($continue_url); if (access::can("view", $item)) { -- cgit v1.2.3