XF 2.1 Check to see if thread creator has usergroup

Dan Hawkins

Active member
Hey all,

I've got a button which when pressed changes the thread posters usergroup. What I would like to do, is when the usergroup has been changed - hide the button.

Is there something I can add which checks the thread creator's usergroup?

Something like if tread creator usergroup = !1 show this content.

Sort of like the conditional statements?

Many thanks.
 
Hey @Russ

I'm actually putting this in "thread_view".

I don't want to check whoever is viewing the button. I want to check if the thread creator is set to usergroup X.

I already have a bunch of checks for staff to show the button, but I want to only display the button, if the usergroup of the person who made the thread, isnt in group X

For example:
1582652071837.webp

I only want to check "TestAccounts" usergroup. If he's already part of "Whitelist" I want the "WHITELIST" container at the bottom to be hidden. I don't want to check the permissions of whoever is viewing it.
 
Top Bottom