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