User account form ignores preferred language field default values

Created on 1 February 2015, almost 10 years ago
Updated 15 May 2023, over 1 year ago

Spin-off from #2405943-31: User entity validation misses form validation logic β†’ and #2227381-48: Apply formatters and widgets to User base fields 'name' and 'email' β†’ :

Problem/Motivation

    $user_preferred_langcode = $register ? $language_interface->getId() : $account->getPreferredLangcode();
    $user_preferred_admin_langcode = $register ? $language_interface->getId() : $account->getPreferredAdminLangcode(FALSE);

The form has hard-coded defaults for the language fields here, which in case of the preferred admin langcode does not match the field definition default value (did not check the other one). The form should respect the default values of the fields though. I'm not sure which default value is the right one though.

Note that #2227381: Apply formatters and widgets to User base fields 'name' and 'email' β†’ would probably address the problem also, but I guess the right default value could need some discussion as well.

Proposed resolution

Remaining tasks

User interface changes

API changes

πŸ“Œ Task
Status

Closed: outdated

Version

9.5

Component
User moduleΒ  β†’

Last updated 7 days ago

Created by

πŸ‡¦πŸ‡ΉAustria fago Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024