Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently the contact module uses the username in the contact form, email, ...
Patch attached replaces the usage of getUsername() with getDisplayName so the name is also overridable using hook_user_format_name_alter().
Comment | File | Size | Author |
---|---|---|---|
#6 | use_display_name-2717805-6.patch | 3.62 KB | JeroenT |
#6 | interdiff-2717805-4-6.txt | 1.06 KB | JeroenT |
#4 | use_display_name-2717805-4.patch | 4.51 KB | JeroenT |
Comments
Comment #2
dawehnerJust a quick review ...
Does that really make sense for the logger? For those purposes the username is easier to use
Comment #3
jibranNW for #2.
Comment #4
JeroenTMade changes as suggested in #2.
Comment #5
dawehnerthis is also wrong, its not about displaying.
Comment #6
JeroenTCreated a new patch. Made changes as suggested in #5.
Comment #7
dawehnerThank you
Comment #9
catchCommitted/pushed to 8.2.x, thanks!
This is arguably a bug/task, but then it's also a behaviour change that people could be relying on. So leaving at 8.2.x for now since it doesn't feel urgent to apply to 8.1.x - the user will usually know their own username anyway.
Comment #11
xjm