[wp-trac] [WordPress Trac] #39799: Multisite User get "Sorry, that email address is not allowed!" although there Mail adresses are valid

WordPress Trac noreply at wordpress.org
Mon Feb 6 17:17:36 UTC 2017


#39799: Multisite User get "Sorry, that email address is not allowed!" although
there Mail adresses are valid
-------------------------------+------------------------------
 Reporter:  webdevplan         |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Users              |     Version:  4.7.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  multisite
-------------------------------+------------------------------
Changes (by ocean90):

 * keywords:   => reporter-feedback
 * focuses:   => multisite


Old description:

> The cause is in wp-includes/ms-functions.php, line 464:
>                 if ( ! in_array( $emaildomain, $limited_email_domains ) )
> {
>                         $errors->add('user_email', __('Sorry, that email
> address is not allowed!'));
>                 }
>
> it has to be:
>
>                 '''if (in_array(''' $emaildomain, $limited_email_domains
> ) ) {
>                         $errors->add('user_email', __('Sorry, that email
> address is not allowed!'));
>                 }
> without ! before "in_array"!

New description:

 The cause is in wp-includes/ms-functions.php, line 464:

 {{{
 if ( ! in_array( $emaildomain, $limited_email_domains ) ) {
         $errors->add('user_email', __('Sorry, that email address is not
 allowed!'));
 }
 }}}


 it has to be:


 {{{
 if (in_array( $emaildomain, $limited_email_domains ) ) {
         $errors->add('user_email', __('Sorry, that email address is not
 allowed!'));
 }
 }}}

 without ! before "in_array"!

--

Comment:

 Hello @webdevplan, welcome to WordPress Trac!

 Thanks for your report. What's the value of your `limited_email_domains`
 option? The condition looks right to me. This option is used to limit site
 registrations to certain domains (whitelist). If your users are using
 another domain they would get the message.
 If you want to block certain domains you'd have to use the "Banned Email
 Domains" option (`banned_email_domains`) which is a blacklist.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39799#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list