Code

Updated locale handling if a user gets saved Closes #525
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Aug 2008 06:18:18 +0000 (06:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Aug 2008 06:18:18 +0000 (06:18 +0000)
-Only update locale settings, if the edited user is the currently logged in user.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12184 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc

index 84fd2affebdd0522f4aa306d761e29f52777e824..08ba9015ccd611f515028f102dd4bc5a09c96e94 100644 (file)
@@ -1030,8 +1030,9 @@ class user extends plugin
     /* Finally write data with selected 'mode' */
     $this->cleanup();
 
-    if(isset($this->attrs['preferredLanguage'])){
-      $ui = session::get('ui');
+    /* Update current locale settings, if we have edited ourselves */
+    $ui = session::get('ui');
+    if(isset($this->attrs['preferredLanguage']) && $this->dn == $ui->dn){
       $ui->language = $this->preferredLanguage;
       session::set('ui',$ui);
       session::set('Last_init_lang',"update");