aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/sessions.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 13:31:16 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 13:31:16 +0000
commit062a19f1b9874914e7cdc82b3819ad5f85871214 (patch)
tree9edf33446b996be8004bc7b5060536b2cea28462 /engine/lib/sessions.php
parentd6c759b3dc0cfedcd521e79be1c20ce8702e3137 (diff)
downloadelgg-062a19f1b9874914e7cdc82b3819ad5f85871214.tar.gz
elgg-062a19f1b9874914e7cdc82b3819ad5f85871214.tar.bz2
Fix for lingering sessions with nonexistent users
git-svn-id: https://code.elgg.org/elgg/trunk@498 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/sessions.php')
-rw-r--r--engine/lib/sessions.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 9b6562fdd..7fb127ff5 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -136,6 +136,9 @@
if ($user = get_user_by_code($code)) {
$_SESSION['user'] = $user;
} else {
+ unset($_SESSION['user']);
+ $_SESSION['guid'] = 0;
+ $_SESSION['id'] = 0;
}
} else {
$_SESSION['guid'] = 0;