From 5c11c74974d3a1091974869acd53629d79e36bd0 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Mon, 9 Sep 2013 07:45:55 +0200 Subject: [PATCH] allow simple authentication checks wihtout logout --- public/include/classes/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/include/classes/user.class.php b/public/include/classes/user.class.php index dc0c71b7..e28eaa9f 100644 --- a/public/include/classes/user.class.php +++ b/public/include/classes/user.class.php @@ -651,14 +651,14 @@ class User { * @param none * @return bool **/ - public function isAuthenticated() { + public function isAuthenticated($logout=true) { $this->debug->append("STA " . __METHOD__, 4); if (@$_SESSION['AUTHENTICATED'] == true && !$this->isLocked($_SESSION['USERDATA']['id']) && $this->getUserIp($_SESSION['USERDATA']['id']) == $_SERVER['REMOTE_ADDR'] ) return true; // Catchall - $this->logoutUser(); + if ($logout == true) $this->logoutUser(); return false; } }