Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#39799 closed defect (bug) (invalid)

Multisite User get "Sorry, that email address is not allowed!" although there Mail adresses are valid

Reported by: webdevplan's profile webdevplan Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.1
Component: Users Keywords: reporter-feedback close
Focuses: multisite Cc:

Description (last modified by ocean90)

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"!

Change History (5)

#1 @ocean90
7 years ago

  • Description modified (diff)
  • Focuses multisite added
  • Keywords reporter-feedback added

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.

#2 @MaximeCulea
7 years ago

Hello @webdevplan,

As I played recently (last week) with limited_email_domains and banned_email_domains, I agree with @ocean90 with the current behaviour for user register :
limited_email_domains => only use theses emails domains
banned_email_domains => expect all but not theses emails domains

I just checked in multisite context, it seems all good for now in 4.7.2 version ! :)

#3 @webdevplan
7 years ago

  • Keywords close added
  • Resolution set to invalid
  • Status changed from new to closed

Oh, the reason for the error was on our side.

Thank you to both.

#4 @webdevplan
7 years ago

  • Severity changed from normal to trivial

#5 @flixos90
7 years ago

  • Milestone Awaiting Review deleted
  • Severity changed from trivial to normal
Note: See TracTickets for help on using tickets.