XF 1.4 Why is the path to the member profile different in tagging?


Active member

The Url to Mikes Profil is:
If I tag @Mike than the URL path in the thread is:

If Mike like a post, then in likes the Path is:

Why is the path to the member profile different in tagging?

Chris D

XenForo developer
Staff member
It's because the link is built using only the number (which technically is the only relevant piece of information).

It would be possible for this to be overcome by grabbing the content of the BB Code, and passing an array containing the content, e.g. the username and the user ID.

$user = array(
    'username' => $content,
    'user_id' => $userId

$link = XenForo_Link::buildPublicLink('full:members', $user);
Another scenario which is likely to become common, is if Mike changed his name to Michael, then the user tag in the post will still say @Mike and with my fix above the URL would be /members/mike.3/, but the fact that the content is liked would actually pull the correct name in as @Michael and the URL would be /members/michael.3/

There will always be an element of inconsistency. The above examples will work and will always get to Mike's profile regardless of the name. Only the user_id part is important.