WordPress.org

Make WordPress Core

Ticket #16235: welcome.diff

File welcome.diff, 819 bytes (added by transom, 3 years ago)

Add filter to kill Welcome Email if nonotification

  • trunk31/wp-admin/user-new.php

     
    106106                        $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_REQUEST['user_login']), true)); 
    107107                        if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { 
    108108                                add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email 
     109                                add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email 
    109110                        } 
    110111                        wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ); 
    111112                        if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {