WordPress.org

Make WordPress Core

Ticket #14290: 14290.diff

File 14290.diff, 568 bytes (added by coffee2code, 11 years ago)

Patch

  • wp-login.php

     
    306306
    307307        $user_pass = wp_generate_password();
    308308        $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
    309         if ( ! $user_id ) {
     309        if ( is_wp_error( $user_id ) ) {
    310310                $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
    311311                return $errors;
    312312        }