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.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 468bc2233..411fe4b73 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -98,8 +98,11 @@
function get_loggedin_user()
{
global $SESSION;
-
- return $SESSION['user'];
+
+ if (isset($SESSION))
+ return $SESSION['user'];
+
+ return false;
}
/**
@@ -461,7 +464,10 @@
{
session_destroy();
return false;
- }
+ }
+
+ // Since we have loaded a new user, this user may have different language preferences
+ register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");
return true;