MyBB Community Forums

Full Version: Two Bugs in Ban User in ModCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
There's a bug in banning a user in modcp.

Problem:
When the forum has custom groups and only one banned group (Default Banned Group (gid=7), if you ban a user it says: You did not select a valid group to move this user to.
Also, It shows a Lift Ban option while the user is not banned cause of that error! And clicking on Lift Ban   causes this error:
You have selected an invalid ban.

Soloution:
1- Open modcp.php
2- Find:
        eval("\$bangroups = \"".$templates->get("modcp_banuser_bangroups_hidden")."\";");
3- Replace:
        $query = $db->simple_select("usergroups", "gid", "isbannedgroup=1");
        $group['gid'] = $db->fetch_field($query, "gid");
        eval("\$bangroups = \"".$templates->get("modcp_banuser_bangroups_hidden")."\";");
confirm ..
(2014-09-07, 10:22 AM).m. Wrote: [ -> ]confirm ..
+1

Edit:
Error caps..

[Image: qxtqbq.png]

[Image: ayu8pi.png]
confirmed, same problem.
Confirmed