MyBB Community Forums

Full Version: [F] [Mod-CP] Lift ban link not working [C-Chris]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1. Go into the Mod-CP -> Banning -> *User* -> Edit Ban.
2. Click on the link "Lift ban". You get this message:
You have selected an invalid ban.

In modcp.php you can find this line:
$lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&amp;uid={$user['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";
$user['uid'] is empty because uid is not a part of the query before:
$query = $db->query("
	SELECT b.*, u.username
	FROM ".TABLE_PREFIX."banned b
	LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
	WHERE b.uid='{$mybb->input['uid']}'
");
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group