MyBB Community Forums

Full Version: [Resolved] Bans page tweaking
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've seen a few variations on this plugin, and for the time being, I'm using labrocca's plugin. What I'd like to know, is how to restructure this so that only specific usergroups have access to it, rather than anyone who knows the URL.
I don't know how the plugin works but try using this in your bans page file.

if($mybb->user['usergroup'] == 3 || $mybb->user['usergroup'] == 5 || $mybb->user['usergroup'] == 6)
{
     // Code for those users in group 3, 5 and 6
}
else
{
     error_no_permission();
} 
(2013-10-15, 12:47 AM)Arbaz Wrote: [ -> ]I don't know how the plugin works but try using this in your bans page file.

if($mybb->user['usergroup'] == 3 || $mybb->user['usergroup'] == 5 || $mybb->user['usergroup'] == 6)
{
     // Code for those users in group 3, 5 and 6
}
else
{
     error_no_permission();
} 

were it not a paid plugin I'd post the code for tweaking. I'll try tweaking that in the next day or two. At a glance, I think i know where that snippet will work.

Just tested the code - works perfect. Thanks for posting it.

Hopefully after I get the hang of MyBB, I wont have to post threads like this.