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
This commit is contained in:
parent
0fbefeaaf9
commit
3a8676278d
|
@ -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() ) {
|
||||
|
|
Loading…
Reference in New Issue