Problem/Motivation
Account menu in the header looks poor in some cases:
- User picture is not shown if user uploads a custom avatar.
- User's Display Name is not shown.
- User's fallback avatar is based on first letter of username instead of first letter of Display Name.
- The fallback avatar has a underline inside the avatar because it is part of the link.
Steps to reproduce
- Install Realname module and configure it to be based on a custom field_display_name added to the user entity. Edit account and ensure username is different from real name. Then check site header on frontend theme.
- Upload a user picture. Check site header on frontend theme.
Proposed resolution
- Display user picture instead of fallback avatar, in account menu.
- Show "Display Name" in account menu.
- Make fallback avatar based on first letter of Display Name instead of username. (By using display name, it should correctly fallback to username if no custom display name logic is configured).
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3568890-after_no_avatar.png | 115.79 KB | jwilson3 |
| #5 | 3568890-after.png | 178.88 KB | jwilson3 |
| #3 | 3568890-before.png | 241.21 KB | jwilson3 |
Issue fork rivet-3568890
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments
Comment #2
jwilson3Comment #3
jwilson3Comment #5
jwilson3Before:
After (with avatar):
After (no avatar):
Comment #7
jwilson3Fixed in 1.1.3