diff options
Diffstat (limited to 'lib/l10n.php')
-rw-r--r-- | lib/l10n.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/l10n.php b/lib/l10n.php index ff0238241a6..053c6fbc10e 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -200,8 +200,8 @@ class OC_L10N{ else{ $available=self::findAvailableLanguages( $app ); } - if( isset($_SESSION['user_id']) && $_SESSION['user_id'] && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ - $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); + if( OC_USER::getUser() && OC_PREFERENCES::getValue( OC_USER::getUser(), 'core', 'lang' )){ + $lang = OC_PREFERENCES::getValue( OC_USER::getUser(), 'core', 'lang' ); self::$language = $lang; if( array_search( $lang, $available ) !== false ){ return $lang; |