aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/languages.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/languages.php')
-rw-r--r--engine/lib/languages.php12
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;