diff options
Diffstat (limited to 'submit.php')
-rwxr-xr-x | submit.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/submit.php b/submit.php index d138cea..72c3e8c 100755 --- a/submit.php +++ b/submit.php @@ -26,6 +26,11 @@ if ($_SERVER["SERVER_NAME"] != "localhost") function isTaken($istaken) { return in_array($istaken, file("userlist", FILE_IGNORE_NEW_LINES)); } +function bannedUsers($name) { + return in_array($name, [ + 'campari', + ]); +} function forbidden_name($name) { return in_array($name, [ '0x0', @@ -94,7 +99,7 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) { $message .= "<li>username too long (32 character max)</li>"; if (!preg_match('/^[A-Za-z][A-Za-z0-9]{2,31}$/', $name)) $message .= "<li>username contains invalid characters (lowercase only, must start with a letter)</li>"; - if (isTaken($name) || forbidden_name($name)) + if (isTaken($name) || forbidden_name($name) || bannedUsers($name)) $message .= "<li>sorry, the username $name is unavailable</li>"; // Check the e-mail address. |