1
0
mirror of https://github.com/flarum/core.git synced 2025-07-28 04:00:40 +02:00

Use canonical username for user profile link. fixes flarum/core#1265

This commit is contained in:
Toby Zerner
2018-11-14 12:09:32 +10:30
parent 7929d2e4bf
commit 7075998b87

View File

@@ -75,6 +75,7 @@ class FormatUserMentions
$event->xml = Utils::replaceAttributes($event->xml, 'USERMENTION', function ($attributes) use ($post) {
$user = $post->mentionsUsers->find($attributes['id']);
if ($user) {
$attributes['username'] = $user->username;
$attributes['displayname'] = $user->display_name;
}