WordPress.org

Make WordPress Core

Ticket #35778: 35778.patch

File 35778.patch, 661 bytes (added by viralsampat, 2 years ago)

Edit the user information after the user is created.

  • wp-admin/includes/upgrade.php

     
    8686                $message = __('User already exists. Password inherited.');
    8787        }
    8888
    89         $user = new WP_User($user_id);
    90         $user->set_role('administrator');
     89    $user = new WP_User( $user_id );
     90    $user->set_role( 'administrator' );
     91    $user->user_url = $guessurl;
    9192
    92         wp_install_defaults($user_id);
     93    wp_update_user( $user );
    9394
     95    wp_install_defaults( $user_id );
     96
    9497        wp_install_maybe_enable_pretty_permalinks();
    9598
    9699        flush_rewrite_rules();