Moderator Usergroup Conditional Issue

Ranger375

Well-known member
I'm not entirely sure, but for a number of customizations on my site, the following conditional doesnt pick up the moderators.

{$user.is_moderator}

the admin version of the conditional works fine, just not the mod version. Any ideas what could be wrong?
 

Jake Bunce

XenForo moderator
Staff member
That flag is only set if you add them as a moderator in your:

Admin CP -> Users -> Moderators -> Create New Moderator

This is as opposed to just adding the user to the Moderating group.
 

Jake Bunce

XenForo moderator
Staff member
This is a template conditional right? What template is it in? And what code are you using?
 

Ranger375

Well-known member
In the sidebar_online_users I have <xen:if is="{$user.is_moderator} OR {$user.is_admin}"> to show the usergroup markup. The moderator markup isnt working. I actually have another template where I used the mod conditional for CSS rank in the postbit, and it failed to work, so I used the group number as a work around to it.
 

Jake Bunce

XenForo moderator
Staff member
It works for me on my test forum.

Maybe there is a problem with your placement of the conditional code. If you post the whole template then I can take a look.

You should also check the xf_user.is_moderator field in the database. Make sure it's set to 1 for the moderator in question.
 
Top