Problem/Motivation
- Realname module alters the display name, but at
user/1234
the username is shown. This is incorrect. - Tons of places in core that show the username, but need to show the users display name.
- Comments do not show DisplayName for registered users.
- Security problem as usernames should never shown on websites. With real names you cannot login and try passwords, with a username you can.
Proposed resolution
- Fix all places where
getUsername()
orgetAccountName()
is used, butgetDisplayName()
should be used. - Change core to enable a DisplayName by default. That is why tons of tests are failing because of wrong usage.
Remaining tasks
Allow for configurable truncation length of display name: #2767787: Allow custom truncate username settings
User interface changes
Users DisplayName will be properly shown.
API changes
API addition: Entity::getDisplayNameTruncated to get the correct abrivation used in theme_preprocess_username() function.
Data model changes
none