aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 16:32:13 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-03 16:32:13 +0000
commitdee5c38edea5fb9f3acd61a91b6669b97b80ec7f (patch)
treece232e9e411feaa28df63894bccf79dc1c497891 /engine/lib
parent54f7543b0445c40ee14dc9fbf5694f849a43c50c (diff)
downloadelgg-dee5c38edea5fb9f3acd61a91b6669b97b80ec7f.tar.gz
elgg-dee5c38edea5fb9f3acd61a91b6669b97b80ec7f.tar.bz2
Fixed session initialisation issue
git-svn-id: https://code.elgg.org/elgg/trunk@394 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/sessions.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 5b12f69ab..9b6562fdd 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -115,18 +115,16 @@
session_start();
if (empty($_SESSION['guid'])) {
- if (isset($_COOKIE['elggperm'])) {
-
+ if (isset($_COOKIE['elggperm'])) {
$code = $_COOKIE['elggperm'];
$code = md5($code);
+ $_SESSION['guid'] = 0;
+ $_SESSION['id'] = 0;
if ($user = get_user_by_code($code)) {
$_SESSION['user'] = $user;
$_SESSION['id'] = $user->getGUID();
$_SESSION['guid'] = $_SESSION['id'];
$_SESSION['code'] = $_COOKIE['elggperm'];
- } else {
- $_SESSION['id'] = 0;
- $_SESSION['guid'] = 0;
}
} else {
$_SESSION['id'] = 0;