mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Users: Allow to create users without sending an email to the new user.
This adds a checkbox to `wp-admin/user-new.php` to prevent sending an email with the username and a password reset link to the new user. Restores the behavior of pre-4.3. Fixes #33504. Props tharsheblows, SergeyBiryukov, DrewAPicture, ocean90. git-svn-id: https://develop.svn.wordpress.org/trunk@35742 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -368,7 +368,7 @@ $new_user_lastname = $creating && isset( $_POST['last_name'] ) ? wp_unslash( $_P
|
||||
$new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : '';
|
||||
$new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : '';
|
||||
$new_user_role = $creating && isset( $_POST['role'] ) ? wp_unslash( $_POST['role'] ) : '';
|
||||
$new_user_send_password = $creating && isset( $_POST['send_password'] ) ? wp_unslash( $_POST['send_password'] ) : true;
|
||||
$new_user_send_notification = $creating && ! isset( $_POST['send_user_notification'] ) ? false : true;
|
||||
$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unslash( $_POST['noconfirmation'] ) : '';
|
||||
|
||||
?>
|
||||
@@ -418,7 +418,6 @@ $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl
|
||||
</button>
|
||||
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
|
||||
</div>
|
||||
<p><span class="description"><?php _e( 'A password reset link will be sent to the user via email.' ); ?></span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-field form-required user-pass2-wrap hide-if-js">
|
||||
@@ -436,6 +435,10 @@ $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Send User Notification' ) ?></th>
|
||||
<td><label for="send_user_notification"><input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> /> <?php _e( 'Send the new user an email about their account.' ); ?></label></td>
|
||||
</tr>
|
||||
<?php } // !is_multisite ?>
|
||||
<tr class="form-field">
|
||||
<th scope="row"><label for="role"><?php _e('Role'); ?></label></th>
|
||||
|
||||
Reference in New Issue
Block a user