Checks if a given email is banned. Throws an error and logs the ban if the address is fully banned or has the specified ban restriction applied to it.


void isBannedEmail (string $email, string $restriction, string $error)

Parameter $email

Expected type: String
Description: An email address to check

Parameter $restriction

Expected type: Enumerated String
Description: A string indicating what type of ban restriction to check (see BanEdit in ManageBans.php for more details)

Parameter $error

Expected type: String
Description: A specific error message that should be given to the user (ie "You've been post banned!" or a specific $txt string)


  • Performs an immediate ban if the check turns out positive.