aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-28 10:43:21 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-28 10:43:21 +0000
commite886ed5b0f30091cf6aa8c758a06a37218ea3c0d (patch)
tree9a02a0dd7feb3ac0a183fe092310d6305a37e224
parentdfc57f305c8c0de9933d6501668617fc1a195b82 (diff)
downloadelgg-e886ed5b0f30091cf6aa8c758a06a37218ea3c0d.tar.gz
elgg-e886ed5b0f30091cf6aa8c758a06a37218ea3c0d.tar.bz2
A further fix for previous.
git-svn-id: https://code.elgg.org/elgg/trunk@730 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/sessions.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 790f11b1a..c302ed3cc 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -75,6 +75,9 @@
$_SESSION['code'] = $code;
+ if (($persistent))
+ setcookie("elggperm", $code, (time()+(86400 * 30)),"/");
+
if (!$user->save() || !trigger_event('login','user',$user)) {
unset($_SESSION['username']);
unset($_SESSION['name']);
@@ -82,11 +85,9 @@
unset($_SESSION['guid']);
unset($_SESSION['id']);
unset($_SESSION['user']);
+ setcookie("elggperm", "", (time()-(86400 * 30)),"/");
return false;
}
-
- if (($persistent))
- setcookie("elggperm", $code, (time()+(86400 * 30)),"/");
return true;