aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/sessions.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 320813289..2c84b2d1f 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -21,7 +21,8 @@
function isloggedin() {
if (!is_installed()) return false;
- if ((isset($_SESSION['guid'])) && ($_SESSION['guid'] > 0))
+ if ((isset($_SESSION['guid'])) && ($_SESSION['guid'] > 0) && (isset($_SESSION['id'])) && ($_SESSION['id'] > 0) )
+
return true;
return false;
@@ -139,7 +140,8 @@
if (!trigger_elgg_event('logout','user',$_SESSION['user'])) return false;
$_SESSION['user']->code = "";
$_SESSION['user']->save();
- }
+ }
+
unset($_SESSION['username']);
unset($_SESSION['name']);
unset($_SESSION['code']);