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