From fa564a74a579327a75d9f9ae0736758c00c5e3ab Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Tue, 18 Feb 2014 19:51:27 +0000
Subject: [PATCH] Destroy staff session on logout

---
 scp/logout.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scp/logout.php b/scp/logout.php
index 806e0afb1..bdc697c78 100644
--- a/scp/logout.php
+++ b/scp/logout.php
@@ -25,8 +25,11 @@ $thisstaff->logOut();
 //Clear any ticket locks the staff has.
 TicketLock::removeStaffLocks($thisstaff->getId());
 
-//Clear upgrader session on logout.
-$_SESSION['ost_upgrader'] = null;
+//Destroy session on logout.
+// TODO: Stop doing this starting with 1.9 - separate session data per
+// app/panel.
+session_unset();
+session_destroy();
 
 @header('Location: login.php');
 require('login.php');
-- 
GitLab