diff --git a/modules/Users/views/view.wizard.php b/modules/Users/views/view.wizard.php index ad68d5dcb47..3e974a8ee01 100755 --- a/modules/Users/views/view.wizard.php +++ b/modules/Users/views/view.wizard.php @@ -204,7 +204,16 @@ function setSymbolValue(id) { //// Name display format $this->ss->assign('default_locale_name_format', $locale->getLocaleFormatMacro($current_user)); - $this->ss->assign('user_language', get_select_options_with_id($sugar_config['languages'], $current_user->getPreference('language'))); + + $disabledLanguages = $sugar_config['disabled_languages'] ?? ''; + $language = $current_user->getPreference('language'); + + + if (str_contains($disabledLanguages, $language)){ + $language = $sugar_config['default_language']; + } + + $this->ss->assign('user_language', get_select_options_with_id(get_languages(), $language)); $this->ss->assign('getNameJs', $locale->getNameJs()); $this->ss->assign('TIMEOPTIONS', get_select_options_with_id($sugar_config['time_formats'], $current_user->_userPreferenceFocus->getDefaultPreference('default_time_format')));