diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-16 13:52:47 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-16 13:52:47 +0000 |
commit | ebe86f345e11852251fd48956e1704297950416f (patch) | |
tree | 3b10b69c8d07aed47d549d409d5a5b585f3b1481 /engine/lib/sessions.php | |
parent | 254d24bef4f9bc84da8496f4014e65763bdcffd9 (diff) | |
download | elgg-ebe86f345e11852251fd48956e1704297950416f.tar.gz elgg-ebe86f345e11852251fd48956e1704297950416f.tar.bz2 |
Closes #429: Language loading now no longer loads all possible translations - only english + user's preferred language/site preference
git-svn-id: https://code.elgg.org/elgg/trunk@2762 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/sessions.php')
-rw-r--r-- | engine/lib/sessions.php | 12 |
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;
|