aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/sessions.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/sessions.php')
-rw-r--r--engine/lib/sessions.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 87e2f931d..5b08a6e5b 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -184,14 +184,16 @@
$code = $_COOKIE['elggperm'];
$code = md5($code);
$_SESSION['guid'] = 0;
- $_SESSION['id'] = 0;
+ $_SESSION['id'] = 0;
+ $_SESSION['user'] = new ElggDummy();
if ($user = get_user_by_code($code)) {
$_SESSION['user'] = $user;
$_SESSION['id'] = $user->getGUID();
$_SESSION['guid'] = $_SESSION['id'];
$_SESSION['code'] = $_COOKIE['elggperm'];
}
- } else {
+ } else {
+ $_SESSION['user'] = new ElggDummy();
$_SESSION['id'] = 0;
$_SESSION['guid'] = 0;
}
@@ -201,11 +203,13 @@
if ($user = get_user_by_code($code)) {
$_SESSION['user'] = $user;
} else {
- unset($_SESSION['user']);
+ //unset($_SESSION['user']);
+ $_SESSION['user'] = new ElggDummy();
$_SESSION['guid'] = 0;
$_SESSION['id'] = 0;
}
- } else {
+ } else {
+ $_SESSION['user'] = new ElggDummy();
$_SESSION['guid'] = 0;
$_SESSION['id'] = 0;
}
@@ -213,7 +217,7 @@
if ($_SESSION['id'] > 0) {
set_last_action($_SESSION['id']);
}
-
+ print_r($_SESSION);
register_action("login",true);
register_action("logout");