diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php
index 8e1df4f..bcda72b 100644
a
|
b
|
function edit_user( $user_id = 0 ) { |
176 | 176 | $user_id = wp_update_user( $user ); |
177 | 177 | } else { |
178 | 178 | $user_id = wp_insert_user( $user ); |
179 | | wp_new_user_notification( $user_id, null, 'both' ); |
| 179 | wp_new_user_notification( $user_id, null, isset( $_POST['send_reset_link'] ) ? 'both' : 'admin' ); |
180 | 180 | } |
181 | 181 | return $user_id; |
182 | 182 | } |
diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php
index 33fd41d..63e67d0 100644
a
|
b
|
$new_user_lastname = $creating && isset( $_POST['last_name'] ) ? wp_unslash( $_P |
355 | 355 | $new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : ''; |
356 | 356 | $new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : ''; |
357 | 357 | $new_user_role = $creating && isset( $_POST['role'] ) ? wp_unslash( $_POST['role'] ) : ''; |
358 | | $new_user_send_password = $creating && isset( $_POST['send_password'] ) ? wp_unslash( $_POST['send_password'] ) : true; |
| 358 | $send_reset_link = $creating && ! isset( $_POST['send_reset_link'] ) ? false : true; |
359 | 359 | $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unslash( $_POST['noconfirmation'] ) : ''; |
360 | 360 | |
361 | 361 | ?> |
… |
… |
if ( apply_filters( 'show_password_fields', true ) ) : ?> |
432 | 432 | </label> |
433 | 433 | </td> |
434 | 434 | </tr> |
| 435 | <tr> |
| 436 | <th scope="row"><label for="send_reset_link"><?php _e('') ?></label></th> |
| 437 | <td><label for="send_reset_link"><input type="checkbox" name="send_reset_link" id="send_reset_link" value="admin" <?php checked( $send_reset_link ); ?> /> <?php _e('Send the new user a reset password link.'); ?></label></td> |
| 438 | </tr> |
435 | 439 | <?php endif; ?> |
436 | 440 | <?php } // !is_multisite ?> |
437 | 441 | <tr class="form-field"> |