Make WordPress Core

Changeset 29880


Ignore:
Timestamp:
10/12/2014 01:10:21 AM (10 years ago)
Author:
jeremyfelt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-new.php

    r29233 r29880  
    127127            if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {
    128128                add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email
     129                add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email
    129130            }
    130131            wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
Note: See TracChangeset for help on using the changeset viewer.