Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 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 Owned by:
Priority: normal Milestone:
Component: Users Version: 4.7.1
Severity: normal Keywords: reporter-feedback close
Cc: Focuses: multisite

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
10 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
10 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
10 years ago

  • Keywords close added
  • Resolutioninvalid
  • Status newclosed

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

Thank you to both.

#4 @webdevplan
10 years ago

  • Severity normaltrivial

#5 @flixos90
10 years ago

  • Milestone Awaiting Review
  • Severity trivialnormal
Note: See TracTickets for help on using tickets.