{if $userProfile === null}
{* user no longer exists, use plain output rather than using a broken link *}
- @{$username}
+ <span class="userMention">{$username}</span>
{else}
- {* non-breaking space below to prevent wrapping of user avatar and username *}
- <a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}">{@$userProfile->getAvatar()->getImageTag(16)} {$userProfile->username}</a>
+ <a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}" class="userMention userLink" data-user-id="{@$userProfile->userID}">{$userProfile->username}</a>
{/if}
/** @var UserProfile $userProfile */
$userProfile = MessageEmbeddedObjectManager::getInstance()->getObject('com.woltlab.wcf.user', $userID);
- if ($userProfile === null) {
- return '@'.$content;
- }
return WCF::getTPL()->fetch('userBBCodeTag', 'wcf', [
'username' => $content,