Make WordPress Core

Ticket #14290: 14290.3.diff

File 14290.3.diff, 597 bytes (added by coffee2code, 11 years ago)

Refreshed patch to apply cleanly as of r25172.

  • wp-login.php

     
    353353
    354354        $user_pass = wp_generate_password( 12, false);
    355355        $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
    356         if ( ! $user_id ) {
     356        if ( ! $user_id || is_wp_error( $user_id ) ) {
    357357                $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn&#8217;t register you&hellip; please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
    358358                return $errors;
    359359        }