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

Fix crash logging out during upgrade

parent 8ee679ac
No related branches found
No related tags found
No related merge requests found
......@@ -20,18 +20,23 @@ require('staff.inc.php');
if(!$_GET['auth'] || !$ost->validateLinkToken($_GET['auth']))
@header('Location: index.php');
$thisstaff->logOut();
//Clear any ticket locks the staff has.
Lock::removeStaffLocks($thisstaff->getId());
//Destroy session on logout.
// TODO: Stop doing this starting with 1.9 - separate session data per
// app/panel.
session_unset();
session_destroy();
osTicketSession::destroyCookie();
try {
$thisstaff->logOut();
//Destroy session on logout.
// TODO: Stop doing this starting with 1.9 - separate session data per
// app/panel.
session_unset();
session_destroy();
osTicketSession::destroyCookie();
//Clear any ticket locks the staff has.
Lock::removeStaffLocks($thisstaff->getId());
}
catch (Exception $x) {
// Lock::removeStaffLocks may throw InconsistentModel on upgrade
}
@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