source: trunk/services/logout.php @ 148

Last change on this file since 148 was 147, checked in by scdev, 18 years ago

Q - Change Auth_SQL::getVal to Auth_SQL::get and Auth_SQL::setVal to Auth_SQL::set.

File size: 549 bytes
RevLine 
[1]1<?php
2/**
[42]3 * logout.php
[1]4 * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
5 */
6
[136]7if (isset($auth) && method_exists($auth, 'getVal')) {
[103]8    // Delete the current user's record locks.
[137]9    require_once 'codebase/lib/Lock.inc.php';
10    $lock =& Lock::getInstance($auth);
[147]11    $lock->removeAll($auth->get('user_id'));
[22]12}
[1]13
14// Logout.
15$auth->clearAuth();
16
[136]17$app->raiseMsg(sprintf(_("Your session has been logged-out."), null), MSG_SUCCESS, __FILE__, __LINE__);
18$app->dieURL($app->getParam('redirect_home_url'));
[1]19
20?>
Note: See TracBrowser for help on using the repository browser.