2014-09-07, 09:40 AM
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:
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")."\";");