Changeset 611 for trunk/services
- Timestamp:
- Aug 24, 2017 4:27:34 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/logout.php
r468 r611 4 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 5 * Copyright 2001-2012 Strangecode, LLC 6 * 6 * 7 7 * This file is part of The Strangecode Codebase. 8 8 * … … 11 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 12 * any later version. 13 * 13 * 14 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 17 * details. 18 * 18 * 19 19 * You should have received a copy of the GNU General Public License along with 20 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 25 25 */ 26 26 27 if (isset($auth) && method_exists($auth, 'get') && true === $app->getParam('enable_db')) { 28 // Delete the current user's record locks. 29 require_once 'codebase/lib/Lock.inc.php'; 30 $lock =& Lock::getInstance($auth); 31 $lock->removeAll($auth->get('user_id')); 27 if (isset($prefs) && method_exists($prefs, 'clear')) { 28 $prefs->clear(); 32 29 } 33 34 // Logout. 35 $auth->clear(); 30 if (isset($tmp_prefs) && method_exists($tmp_prefs, 'clear')) { 31 $tmp_prefs->clear(); 32 } 33 if (isset($cache) && method_exists($cache, 'clear')) { 34 $cache->clear(); 35 } 36 if (isset($cart) && method_exists($cart, 'clear')) { 37 $cart->clear(); 38 } 39 if (isset($auth) && method_exists($auth, 'get')) { 40 if (true === $app->getParam('enable_db')) { 41 // Delete the current user's record locks. 42 require_once 'codebase/lib/Lock.inc.php'; 43 $lock =& Lock::getInstance($auth); 44 $lock->removeAll($auth->get('user_id')); 45 } 46 } 47 if (isset($auth) && method_exists($auth, 'clear')) { 48 $auth->clear(); 49 } 36 50 37 51 $app->raiseMsg(sprintf(_("Your session has been logged-out."), null), MSG_SUCCESS, __FILE__, __LINE__);
Note: See TracChangeset
for help on using the changeset viewer.