MyBB Community Forums

Full Version: How to find if a poster (not user) belongs to a certain group?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So using this code

if($GLOBALS['mybb']->user['usergroup'] == 4)

I can check if a user belongs to a group with gid  4. 

I am parsing posts in a thread. So every thread can have users from different groups and I want to parse a given post depending upon the group the user belongs to. 

So, what can I do to find the gid of a poster in a given post of any thread? 
I hope I am clear with my question, if you need any more clarification I can put more details.
basically in postbit, {$post['usergroup']} provides group number