Announcement

Collapse
No announcement yet.

Seeing if a user is part of a certain usergroup?

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

  • Seeing if a user is part of a certain usergroup?

    What's a good way to determine if one of a user's membergroupids are a certain usergroupid? (How can I do this in PHP).

    For instance, how does vBulletin 3 do it, like while searching in the admin cp?

  • #2
    Maybe $userinfo[]; array gives it away? Try printing it on a empty.php file (after including global)

    Comment


    • #3
      Nevermind, problem solved with something like this:
      PHP Code:
                  $condition .= " OR FIND_IN_SET('$id', membergroupids)"
      Works like a charm

      Comment


      • #4
        Great!

        I was trying some stuff out and was pretty close :P

        You beat me to it !!

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X