Skip to content
Snippets Groups Projects
logout.php 873 B
Newer Older
<?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');
Peter Rotich's avatar
Peter Rotich committed
//Check token: Make sure the user actually clicked on the link to logout.
if ($thisclient && $_GET['auth'] && $ost->validateLinkToken($_GET['auth']))
   $thisclient->logOut();
Jared Hancock's avatar
Jared Hancock committed
setcookie(session_name(), 'deleted', 1,
    ini_get('session.cookie_path'),
    ini_get('session.cookie_domain'),
    ini_get('session.cookie_secure'),
    ini_get('session.cookie_httponly'));

Http::redirect('index.php');