WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/is email address unsafe

Description

Checks an email address against a list of banned domains.

This function checks against the Banned Email Domains list at wp-admin/network/settings.php. The check is only run on self-registrations; user creation at wp-admin/network/users.php bypasses this check.

As of 3.5, this function was made marginally less aggressive due to legitimate domains matching as partials of banned domains or sub-domains of banned domains.

Usage

<?php is_email_address_unsafe$user_email ); ?>

Parameters

$user_email
(string) (required) The email provided by the user at registration.
Default: None

Return Values

(bool) 
Returns true when the email address is banned.

Source File

is_email_address_unsafe() is located in wp-includes/ms-functions.php

Changelog

  • 3.5.0: Made less aggressive toward legitimate domains partially matching against banned ones.
  • Since: WPMU