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:
Dominik Schilling (ocean90)
2015-11-25 22:37:35 +00:00
parent 6b37ee4b48
commit daa3fe4d26
4 changed files with 17 additions and 8 deletions

View File

@@ -2198,10 +2198,12 @@ function register_new_user( $user_login, $user_email ) {
*
* @since 4.4.0
*
* @param int $user_id ID of the newly created user.
* @param int $user_id ID of the newly created user.
* @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty string
* (admin only), or 'both' (admin and user). Default 'both'.
*/
function wp_send_new_user_notifications( $user_id ) {
wp_new_user_notification( $user_id, null, 'both' );
function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
wp_new_user_notification( $user_id, null, $notify );
}
/**