aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
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;