From dee5c38edea5fb9f3acd61a91b6669b97b80ec7f Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 3 Apr 2008 16:32:13 +0000 Subject: Fixed session initialisation issue git-svn-id: https://code.elgg.org/elgg/trunk@394 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sessions.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'engine') 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; -- cgit v1.2.3