// ###################### Start doban #######################
if ($HTTP_POST_VARS['action']=="doban") {
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canbanusers=1")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
$banuser=$DB_site->query_first("SELECT username,userid,usergroupid FROM user WHERE userid=$userid");
$ismod=$DB_site->query_first("SELECT moderatorid FROM moderator WHERE userid=$userid");
if ($banuser['usergroupid']!=2 or $ismod) {
echo "<p>You may not ban someone who is not a normal registered user!</p>";
}
if ($bangroup['usergroupid']>6) {
$DB_site->query("UPDATE user SET usergroupid=$bangroup[usergroupid] WHERE userid=$banuser[userid]");
echo "<p>$banuser[username] has been banned!</p>";
} else {
echo "<p>An unknown error occured while attempting to ban $banuser[username] ($banuser[userid]). The group the user was supposed to be moved to was \"$bangroup[usergroupid]\"</p>";
}
}
$bangroup['usergroupid'] = $DB_site->insert_id();
$bangroup['title'] = 'Banned by Moderators';
}
If I wish to change the group which users banned by moderators go into, do I just change 'Banned by Moderators' to the name of the group I want them to go into? Or is there more to this?
You need to change each instance of 'Banned by Moderators' that appears in that large chunk of code to the name of the group you want them to go into.
Ok I searched and replaced Banned by Moderators with Banned in that code and it works flawlessly :)