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

Is there a helper to check if a user is a SUPER moderator?

Discussion in 'XenForo Development Discussions' started by Jaxel, Feb 4, 2011.

  1. Jaxel

    Jaxel Well-Known Member

    Right now I am doing the following in a template
    <xen:if is="{xen:helper ismemberof, $user, 4}">
    	<li class="ribbonStaff"><div class="left"></div><div class="right"></div>Staff / Moderator</li>
    The problem is that this will return true if a user has any moderator permissions; even if they are a moderator of only one forum. I want this to return true only if a user is a super moderator. How would I check this?
  2. Mike

    Mike XenForo Developer Staff Member

    We don't actually distinguish them in the code (the process just distinguishes how permissions are set).
  3. Jaxel

    Jaxel Well-Known Member

    So then I wont be able to do something like?
    <xen:if is="{$user.is_super_moderator}">
  4. Vincent

    Vincent Well-Known Member

    Nope, you can't do that.

    You will have to check the user group id for that :S
  5. ragtek

    ragtek Guest

    Which usergroupid?
    There is no usergroupid for supermods...

    YOu need to check table xf_moderator where moderator.is_super_moderator = 1....

  6. Vincent

    Vincent Well-Known Member

    Well, if you'd create a usergroup :)
  7. Floris

    Floris Guest

    I did the same, I fixed this by making a group called Global, on a networked site. This way the global admins and global mods .. additional usergroup > checkbox, WOOT
  8. Sador

    Sador Well-Known Member

    That would be a nasty solution for addons though, because most people won't have that.

Share This Page