From 3a8676278d2b21ff2c1e64e9ce2598350c8772e2 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Sun, 12 Oct 2014 01:11:18 +0000 Subject: [PATCH] Do not send a welcome notification when noconfirmation has been flagged When adding a new user to a site on the network, 2 emails are sent out - one for confirmation and one as a welcome. If the option for no confirmation is selected, neither should send. props transom Fixes #16235 Built from https://develop.svn.wordpress.org/trunk@29880 git-svn-id: http://core.svn.wordpress.org/trunk@29637 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/user-new.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index 19356ef9f2..eb18d136f4 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -126,6 +126,7 @@ Please click the following link to confirm the invite: $new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) ); if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email + add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email } wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ); if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {