mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 08:22:41 +08:00
Use display names in avatars
This commit is contained in:
parent
cb92deee98
commit
06aa37d2fd
@ -19,7 +19,7 @@ export default function avatar(user, attrs = {}) {
|
||||
// uploaded image, or the first letter of their username if they haven't
|
||||
// uploaded one.
|
||||
if (user) {
|
||||
const username = user.username() || '?';
|
||||
const username = user.displayName() || '?';
|
||||
const avatarUrl = user.avatarUrl();
|
||||
|
||||
if (hasTitle) attrs.title = attrs.title || username;
|
||||
|
Loading…
x
Reference in New Issue
Block a user