Files
osTicket/logout.php
Peter Rotich 47df2b4409 session: use osTicket\Session Backends
This commit should have probably been broken into smaller commits but the
wholesale change was required since it's an overhaul of how osTicket handles
sessions.
2022-10-26 01:18:21 +00:00

26 lines
732 B
PHP

<?php
/*********************************************************************
logout.php
Destroy clients session.
Peter Rotich <peter@osticket.com>
Copyright (c) 2006-2013 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
require('client.inc.php');
//Check token: Make sure the user actually clicked on the link to logout.
if ($thisclient && $_GET['auth'] && $ost->validateLinkToken($_GET['auth']))
$thisclient->logOut();
osTicketSession::destroyCookie();
session_destroy();
Http::redirect('index.php');
?>