MyBB Community Forums

Full Version: Display usergroup script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone tell me how I can edit this php script so it changes everyone's display usergroup to Banned? I want to do it as an April Fools prank:
<?php
define("IN_MYBB", 1);

require "./global.php";

$db->query("UPDATE ".TABLE_PREFIX."users SET displaygroup='0'");
echo "If you see this message, this file should be ready."
?>

Thanks
<?php
define("IN_MYBB", 1);

require "./global.php";

$db->query("UPDATE ".TABLE_PREFIX."users SET displaygroup='4'");
echo "If you see this message, you've just put the display group for all your users as banned!."
?>

If you don't want to put your display group as banned use this query, where X is your uid
$db->query("UPDATE ".TABLE_PREFIX."users SET displaygroup='4' WHERE uid = 'X'");