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 /settings/ajax/setlanguage.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 'settings/ajax/setlanguage.php')
-rw-r--r-- | settings/ajax/setlanguage.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index f971806f4c6..bc467fb9004 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -17,7 +17,7 @@ if( !OC_USER::isLoggedIn()){ // Get data if( isset( $_POST['lang'] ) ){ $lang=$_POST['lang']; - OC_PREFERENCES::setValue( $_SESSION['user_id'], 'core', 'lang', $lang ); + OC_PREFERENCES::setValue( OC_USER::getUser(), 'core', 'lang', $lang ); echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Language changed") ))); }else{ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Invalid request") ))); |