MyBB Community Forums

Full Version: Integration into website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've been integrating myBB into my site, and its mostly been going good, I have it so members only need to register at the forum and they can then log into the site as well, I was wondering something though, I have a comment system and I want to make it so only certain usergroups can post a comment without it needing approval...so what im wondering is how can I get the usergroup information of a user that is logged in?

Thanks.
You can call the variables of the usergroup table by doing this:

$mybb->usergroup['canmodcp']

This will verify if the usergroup can access the Moderator CP. The same can be used for the other fields in the usergroup table.
Awesome, that works perfectly. Thanks alot!