Make WordPress Core

Ticket #39915: 39915.patch

File 39915.patch, 1.1 KB (added by ocean90, 8 years ago)
  • src/wp-includes/ms-functions.php

     
    441441                $errors->add( 'user_name',  __( 'Sorry, that username is not allowed.' ) );
    442442        }
    443443
     444        if ( ! is_email( $user_email ) ) {
     445                $errors->add( 'user_email', __( 'Please enter a valid email address.' ) );
     446        }
     447
    444448        if ( is_email_address_unsafe( $user_email ) )
    445449                $errors->add('user_email',  __('You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.'));
    446450
     
    455459        if ( preg_match( '/^[0-9]*$/', $user_name ) )
    456460                $errors->add('user_name', __('Sorry, usernames must have letters too!'));
    457461
    458         if ( !is_email( $user_email ) )
    459                 $errors->add('user_email', __( 'Please enter a valid email address.' ) );
    460 
    461462        $limited_email_domains = get_site_option( 'limited_email_domains' );
    462463        if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) {
    463464                $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );