Merge pull request #50072 from nextcloud/backport/49988/stable30

[stable30] fix(settings): show the correct initial locale in Personal info
This commit is contained in:
Josh 2025-01-26 11:30:46 -05:00 committed by GitHub
commit 8cfedc03b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -300,8 +300,8 @@ class PersonalInfo implements ISettings {
}
$uid = $user->getUID();
$userLocaleString = $this->config->getUserValue($uid, 'core', 'locale', $this->l10nFactory->findLocale());
$userLang = $this->config->getUserValue($uid, 'core', 'lang', $this->l10nFactory->findLanguage());
$userLocaleString = $this->config->getUserValue($uid, 'core', 'locale', $this->l10nFactory->findLocale($userLang));
$localeCodes = $this->l10nFactory->findAvailableLocales();
$userLocale = array_filter($localeCodes, fn ($value) => $userLocaleString === $value['code']);