is_email_address_unsafe [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
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.
Source
<?php
function is_email_address_unsafe( $user_email ) {
$banned_names = get_site_option( 'banned_email_domains' );
if ($banned_names && !is_array( $banned_names ))
$banned_names = explode( "\n", $banned_names);
if ( is_array( $banned_names ) && empty( $banned_names ) == false ) {
$email_domain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );
foreach ( (array) $banned_names as $banned_domain ) {
if ( $banned_domain == '' )
continue;
if (
strstr( $email_domain, $banned_domain ) ||
(
strstr( $banned_domain, '/' ) &&
preg_match( $banned_domain, $email_domain )
)
)
return true;
}
}
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/is email address unsafe « WordPress Codex
Description. Looks in the banned names list and if there are any matches it returns true. Parameters. $user_email: (string) (required) The email address to be ...
codex.wordpress.org - Function Reference/is email address unsafe « WordPress Codex
Description. Checks an email address against a list of banned domains. This function checks against the Banned Email Domains list at ...
codex.wordpress.org - ko:Function Reference/is email address unsafe « WordPress Codex
ko:Function Reference/is email address unsafe. Languages: English • 한국어 • ( Add your language) ... <?php is_email_address_unsafe( $user_email ); ?> ...
codex.wordpress.org - ms-functions.php
May 7, 2010 ... is_email_address_unsafe(). is_user_member_of_blog(). is_user_option_local(). is_user_spammy(). maybe_add_existing_user_to_blog() ...
www.tig12.net