• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Moderator Usergroup Conditional Issue

Ranger375

Well-known member
#1
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
#2
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.
 

Ranger375

Well-known member
#5
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
#6
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.