mirror of
https://github.com/flarum/core.git
synced 2025-07-28 20:20:34 +02:00
Use canonical username for user profile link. fixes flarum/core#1265
This commit is contained in:
@@ -75,6 +75,7 @@ class FormatUserMentions
|
|||||||
$event->xml = Utils::replaceAttributes($event->xml, 'USERMENTION', function ($attributes) use ($post) {
|
$event->xml = Utils::replaceAttributes($event->xml, 'USERMENTION', function ($attributes) use ($post) {
|
||||||
$user = $post->mentionsUsers->find($attributes['id']);
|
$user = $post->mentionsUsers->find($attributes['id']);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
|
$attributes['username'] = $user->username;
|
||||||
$attributes['displayname'] = $user->display_name;
|
$attributes['displayname'] = $user->display_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user