butlerblog
9/8/2015 - 4:19 PM

Plugin to disable the sending of the new user registration email when the user is created in the Users > All Users screen. This file can be

Plugin to disable the sending of the new user registration email when the user is created in the Users > All Users screen. This file can be saved to the /wp-content/plugins/ then activated from the plugins menu.

<?php
/*
Plugin Name: WP-Members Disable New User Notification
Plugin URI:  http://rocketgeek.com
Description: Disables the WP new user notification email when user is created via the Users > Add New screen.
Version:     1.0
Author:      Chad Butler
Author URI:  http://butlerblog.com/
License:     GPLv2
*/

/*
 * Copyright (c) 2015 Chad Butler
 *
 * @package WordPress
 * @subpackage WordPass
 * @author Chad Butler
 * @copyright 2015
 *
 * Functions Included:
 * - wp_new_user_notification
 */


/**
 * If user is being added by the Users > Add New screen, disable the notification email.
 *
 * @since 1.0
 */
/**
 * If user is being added by the Users > Add New screen, disable the notification email.
 *
 * @since 1.0
 */
if ( ! function_exists( 'wp_new_user_notification' )
	&& isset( $_POST['createuser'] ) 
	&& $_POST['createuser'] == __( 'Add New User' ) ) {
	
	function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
		return;
	}
}