Skip to content
Snippets Groups Projects
Commit a384d6f6 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #522 from protich/feature/logout+ticket-locks


Clear ticket locks on logout

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
parents a303382e 4858b753
No related branches found
No related tags found
No related merge requests found
<?php <?php
/********************************************************************* /*********************************************************************
logout.php logout.php
Log out staff Log out staff
Destroy the session and redirect to login.php Destroy the session and redirect to login.php
Peter Rotich <peter@osticket.com> Peter Rotich <peter@osticket.com>
Copyright (c) 2006-2013 osTicket Copyright (c) 2006-2013 osTicket
http://www.osticket.com http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY. Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details. See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4: vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/ **********************************************************************/
require('staff.inc.php'); require('staff.inc.php');
//Check token: Make sure the user actually clicked on the link to logout. //Check token: Make sure the user actually clicked on the link to logout.
if(!$_GET['auth'] || !$ost->validateLinkToken($_GET['auth'])) if(!$_GET['auth'] || !$ost->validateLinkToken($_GET['auth']))
@header('Location: index.php'); @header('Location: index.php');
$thisstaff->logOut(); $thisstaff->logOut();
//Clear upgrader session on logout.
$_SESSION['ost_upgrader'] = null; //Clear any ticket locks the staff has.
TicketLock::removeStaffLocks($thisstaff->getId());
@header('Location: login.php');
require('login.php'); //Clear upgrader session on logout.
?> $_SESSION['ost_upgrader'] = null;
@header('Location: login.php');
require('login.php');
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment