From d4a4cb44d152a17b5982bc9b1345acf3ef13eabb Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Fri, 8 Sep 2006 09:05:04 +0000 Subject: [PATCH] Time out if the PHP session timed out but the KT one hasn't yet. Better than a meaningless error message. --- lib/session/Session.inc | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/session/Session.inc b/lib/session/Session.inc index f3fb3a3..2850603 100644 --- a/lib/session/Session.inc +++ b/lib/session/Session.inc @@ -211,6 +211,12 @@ class Session { if ($ipTracking && ($ip != trim($aRow["ip"]))) { return PEAR::raiseError(_kt("You are coming from a different IP address than the session requires")); } + + if (empty($_SESSION['userID'])) { + Session::removeStaleSessions(); + + return PEAR::raiseError(_kt('Session timed out')); + } // now check if the timeout has been exceeded $lastused = $aRow["lastused"]; -- libgit2 0.21.4