Commit d4a4cb44d152a17b5982bc9b1345acf3ef13eabb
1 parent
49235ec5
Time out if the PHP session timed out but the KT one hasn't yet. Better
than a meaningless error message. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5930 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
0 deletions
lib/session/Session.inc
| ... | ... | @@ -211,6 +211,12 @@ class Session { |
| 211 | 211 | if ($ipTracking && ($ip != trim($aRow["ip"]))) { |
| 212 | 212 | return PEAR::raiseError(_kt("You are coming from a different IP address than the session requires")); |
| 213 | 213 | } |
| 214 | + | |
| 215 | + if (empty($_SESSION['userID'])) { | |
| 216 | + Session::removeStaleSessions(); | |
| 217 | + | |
| 218 | + return PEAR::raiseError(_kt('Session timed out')); | |
| 219 | + } | |
| 214 | 220 | |
| 215 | 221 | // now check if the timeout has been exceeded |
| 216 | 222 | $lastused = $aRow["lastused"]; | ... | ... |