MyBB Community Forums

Full Version: PHP - usergoup display issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've goofed up by doing this and I don't really know a work around.

On my portal I've got two different images and text that come up depending on their usergroup. My intention was if the author of a thread that appears on the portal had one of the two usergroups it would display that for everyone.

Here's the code:

			<if $mybb->user['usergroup'] == 13 then><div class ="image" align="center">text</div></if>

I checked it out on another browser that wasn't logged in and none of that text/image appear because the person viewing hasn't got one of those two usergroup IDs.

I don't suppose anyone knows how to rectify this?
$mybb->user refers to the visitor. $post['uid'] is the uid of whoever started the post. I do not know a way in a template to translate that into usergroups.