diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-06-22 12:50:57 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-06-22 12:50:57 +0200 |
commit | 83958ebd4be58c64b23a3e9535f4246faeff8f4a (patch) | |
tree | 169321f7bb32e315c6a33ce139b799efdc224da4 /lib/l10n.php | |
parent | c0af177223f5ebd74614b775121ea7f3497d25a5 (diff) | |
download | nextcloud-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.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; |