aboutsummaryrefslogtreecommitdiffstats
path: root/lib/l10n.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-06-22 12:50:57 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-06-22 12:50:57 +0200
commit83958ebd4be58c64b23a3e9535f4246faeff8f4a (patch)
tree169321f7bb32e315c6a33ce139b799efdc224da4 /lib/l10n.php
parentc0af177223f5ebd74614b775121ea7f3497d25a5 (diff)
downloadnextcloud-server-83958ebd4be58c64b23a3e9535f4246faeff8f4a.tar.gz
nextcloud-server-83958ebd4be58c64b23a3e9535f4246faeff8f4a.zip
add oc_user::getUser to get the user id of the loggedin user
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php4
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;