Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293334

Use getDisplayName() for user names consistently

$
0
0

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() or getAccountName() is used, but getDisplayName() 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


Viewing all articles
Browse latest Browse all 293334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>