How can I check if I am at a member profile.


Well-known member
I'm almost done with my add-on, but I need one more thing,

I need to know how to check if the visitor is on a profile of a user.

How do I do this? :S


Formerly Tilkißey
use this if condition in your template
<xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Member' ">your codes</xen:if>
another way

if you use this way, you can fetch all users which are viewing a member's profile
in database
xf_session_activity table
controller_name = XenForo_ControllerPublic_Member
controller_action = Member
params = user_id=X

controller action is defined for actions, so, u can also check controller_name is equal or not to XenForo_ControllerPublic_Member


XenForo developer
Staff member
<xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Member' AND {$controllerAction} == 'Member'">... your stuff here... </xen:if>