From efddddcfa0082922cb681a9e725f6a0456ad4a50 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 5 Oct 2012 14:43:25 -0400
Subject: [PATCH] Clear user session if invalid (expired)

---
 client.inc.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/client.inc.php b/client.inc.php
index 91956c0d7..ce36e7b68 100644
--- a/client.inc.php
+++ b/client.inc.php
@@ -50,6 +50,8 @@ if($_SESSION['_client']['userID'] && $_SESSION['_client']['key'])
 //is the user logged in?
 if($thisclient && $thisclient->getId() && $thisclient->isValid()){
      $thisclient->refreshSession();
+} else {
+    $thisclient = null;
 }
 
 /******* CSRF Protectin *************/
-- 
GitLab