diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-17 12:06:42 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-17 12:06:42 +0000 |
commit | 5f7287c58a276d9df8b000fcdd8698956f86850c (patch) | |
tree | 6d82d6afba81649843e08644b2cb2a3bbf79113f | |
parent | af2e2ae369e0ab13a99b83a928363f6d7f48f715 (diff) | |
download | elgg-5f7287c58a276d9df8b000fcdd8698956f86850c.tar.gz elgg-5f7287c58a276d9df8b000fcdd8698956f86850c.tar.bz2 |
Fixes #164: Seems there is something erroniously setting 'guid' to something in logged in systems (or alternatively this is just a session problem on my system) either way I have modified isloggedin to check both guid and id... which seems to work.
git-svn-id: https://code.elgg.org/elgg/trunk@1453 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/sessions.php | 6 |
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']);
|