diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-11-14 19:03:58 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-11-14 19:03:58 +0000 |
commit | 9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2 (patch) | |
tree | 8cf4279f57f654d5435dacba4dc2bcb4030d2199 /engine/lib/languages.php | |
parent | 2d55e88e095aa1a6b4f58101077aab81788761c9 (diff) | |
download | elgg-9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2.tar.gz elgg-9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2.tar.bz2 |
* Introducing get_loggedin_user() and get_loggedin_userid()
* ACLs now using get_loggedin_user*
* Some logic cleaned up
* Some "Undefined..." messages cleaned up
git-svn-id: https://code.elgg.org/elgg/trunk@2459 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/languages.php')
-rw-r--r-- | engine/lib/languages.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php index acca80c6c..5c62eaa81 100644 --- a/engine/lib/languages.php +++ b/engine/lib/languages.php @@ -55,8 +55,10 @@ { global $CONFIG; - if ((isset($_SESSION['user'])) && ($_SESSION['user']->language)) - $language = $_SESSION['user']->language; + $user = get_loggedin_user(); + + if ((isset($user)) && ($user->language)) + $language = $user->language; if ((empty($language)) && (isset($CONFIG->language))) $language = $CONFIG->language; @@ -78,8 +80,10 @@ global $CONFIG;
- if ((empty($language)) && (isset($_SESSION['user'])) && ($_SESSION['user']->language)) - $language = $_SESSION['user']->language; + $user = get_loggedin_user(); + + if ((empty($language)) && (isset($user)) && ($user->language)) + $language = $user->language; if ((empty($language)) && (isset($CONFIG->language)))
$language = $CONFIG->language; |