Announcement

Collapse
No announcement yet.

How to check a user group?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to check a user group?

    I remember there is a function isn't there to check if a user is in a specific group? I am trying to determine if a user is an administrator, how would I go about doing this with template conditionals?

  • #2
    PHP Code:
    <if condition="is_member_of($bbuserinfo, 6)">
    If 
    the user is an admin, do this
    <else />
    Do 
    this if s/he is not
    </if> 
    If you need to check another usergroup, simply replace 6 with the ID of the usergroup in question.

    Comment


    • #3
      Right, thank you that was the function I was looking for!

      Comment


      • #4
        No problem

        Comment

        Related Topics

        Collapse

        Working...
        X