* Copyright 2001-2012 Strangecode, LLC * * This file is part of The Strangecode Codebase. * * The Strangecode Codebase is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your option) * any later version. * * The Strangecode Codebase is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * The Strangecode Codebase. If not, see . */ /** * logout.php */ if (isset($prefs) && method_exists($prefs, 'clear')) { $prefs->clear(); } if (isset($tmp_prefs) && method_exists($tmp_prefs, 'clear')) { $tmp_prefs->clear(); } if (isset($cache) && method_exists($cache, 'clear')) { $cache->clear(); } if (isset($cart) && method_exists($cart, 'clear')) { $cart->clear(); } if (isset($auth) && method_exists($auth, 'get')) { if (true === $app->getParam('enable_db')) { // Delete the current user's record locks. require_once 'codebase/lib/Lock.inc.php'; $lock =& Lock::getInstance($auth); $lock->removeAll($auth->get('user_id')); } } if (isset($auth) && method_exists($auth, 'clear')) { $auth->clear(); } if (!getFormData('nomsg')) { $app->raiseMsg(sprintf(_("Your session has been logged out."), null), MSG_SUCCESS, __FILE__, __LINE__); } if (getFormData('next')) { $app->dieURL(getFormData('next')); } else { $app->dieURL($app->getParam('redirect_home_url')); }