XF 1.5 online/offline icon code snippet NOT working on member profiles! :(


Well-known member
I use the below code to show when someone is on-line or off-line when reading posts. It displays the respective icon right below the user's avatar and I placed it in template "member_user_info".

I also want to use it in template "member_view" (member profiles) below the avatar but it won't work. It just shows everyone as off-line while it works perfectly when reading posts.

Help please! Thanks!

<xen:if is="{$user.isOnline}"><img src="images/online.gif"><xen:else /><img src="images/offline.gif"></xen:if>


XenForo moderator
Staff member
That param likely isn't available in that template.

You can check by dumping it:
{xen:helper dump, $user.isOnline}
If it returns 'null' then it's not available, otherwise it should return 'true' or 'false'.