Changeset 46989
- Timestamp:
- 12/18/2019 02:24:05 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r46972 r46989 83 83 $user_password = trim( $user_password ); 84 84 $email_password = false; 85 $user_created = false; 86 85 87 if ( ! $user_id && empty( $user_password ) ) { 86 88 $user_password = wp_generate_password( 12, false ); … … 89 91 update_user_option( $user_id, 'default_password_nag', true, true ); 90 92 $email_password = true; 93 $user_created = true; 91 94 } elseif ( ! $user_id ) { 92 // Password has been provided 93 $message = '<em>' . __( 'Your chosen password.' ) . '</em>'; 94 $user_id = wp_create_user( $user_name, $user_password, $user_email ); 95 // Password has been provided. 96 $message = '<em>' . __( 'Your chosen password.' ) . '</em>'; 97 $user_id = wp_create_user( $user_name, $user_password, $user_email ); 98 $user_created = true; 95 99 } else { 96 100 $message = __( 'User already exists. Password inherited.' ); … … 99 103 $user = new WP_User( $user_id ); 100 104 $user->set_role( 'administrator' ); 105 106 if ( $user_created ) { 107 $user->user_url = $guessurl; 108 wp_update_user( $user ); 109 } 101 110 102 111 wp_install_defaults( $user_id );
Note: See TracChangeset
for help on using the changeset viewer.