if condition

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Estad
    Senior Member
    • Jul 2002
    • 271
    • 3.8.x

    if condition

    I would like to ask about this code :
    PHP Code:
    <if condition="$bbuserinfo['usergroupid'] ==13"
    If i want to put more than one groupid in this comdition
    what I hace to do ?

    cange 13 to 13,6,5

    How ?
    Kuwait sun
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    use this:

    PHP Code:
    <if condition="in_array($bbuserinfo[usergroupid], array(13,6,5))"
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • Zachery
      Former vBulletin Support
      • Jul 2002
      • 59097

      #3
      Just out of wondering, are you checking for primary or secondary usergroups?

      Comment

      • Gearloose
        Member
        • Mar 2005
        • 66

        #4
        Originally posted by Colin F
        use this:

        PHP Code:
        <if condition="in_array($bbuserinfo[usergroupid], array(13,6,5))"
        Does the above work only for primary usergroups?

        If we want to check for secondary usergroups also, should we use...
        HTML Code:
        <if condition="is_member_of($bbuserinfo, array(13,6,5))">
        ..., am I right?

        Comment

        • TheMusicMan
          Senior Member
          • Oct 2002
          • 2140
          • 3.7.x

          #5
          Yes I believe so Gearloose...
          John

          Comment

          • s.sami
            New Member
            • Aug 2011
            • 15
            • 3.8.x

            #6
            hi

            i need if user have permissinon on this forumid can see this code

            is this possible ?

            Comment

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