Announcement

Collapse
No announcement yet.

Restrict Code Based on Usergroup

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

  • Restrict Code Based on Usergroup

    I should know this after all these years, but...

    How can I restrict whether code is displayed to certain usergroups?

    In particular, I only want guests and banned to get a popup about turning their Adblock off.

    Will this work in 3.8.7?

    Code:
     <if condition="in_array($bbuserinfo['usergroupid'], array(1, 3))">
      pop code
    </if>



    Help, fellas?
    Last edited by diecastfast; Sat 2nd Aug '14, 6:58pm.

  • #2
    Yes, that should work. You may need to test to ensure the behaviour is correct spoecifiying usergroup id 1 (unregistered), if not please post back, there are tweaks can be made to the conditional.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.6.0 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      Banned usergroup is 8, not 3.

      Comment


      • #4
        Usergroup 8 may or may not be a banned group, depending on the forum set-up.
        Baby, I was born this way

        Comment

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