diff --git a/admin/inc/class.admin_cmd_edit_preferences.inc.php b/admin/inc/class.admin_cmd_edit_preferences.inc.php index 0d6613a589..3ade556c1d 100644 --- a/admin/inc/class.admin_cmd_edit_preferences.inc.php +++ b/admin/inc/class.admin_cmd_edit_preferences.inc.php @@ -87,7 +87,8 @@ class admin_cmd_edit_preferences extends admin_cmd $prefs->add($this->app, $name, $value, in_array($this->pref, array('default', 'forced')) ? $this->pref : 'user'); } } - $prefs->save_repository(true, $this->pref); + $prefs->save_repository(true, $this->pref == 'group' ? 'user' : $this->pref); + return lang('Preferences saved.'); } diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index 9f3f7c6c66..2d44bc9ac9 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -334,7 +334,9 @@ class preferences_settings { if ($content['is_admin']) { - self::admin_cmd_run($content, $values, $GLOBALS['egw']->preferences->get_account_id(), $type, $appname); + if (($account_id = $GLOBALS['egw']->preferences->get_account_id()) < 0 && $type == 'user') $type = 'group'; + + self::admin_cmd_run($content, $values, $account_id, $type, $appname); } else {