#3: wpmu_signup_user_notification

The wpmu_signup_user_notification filter is used in a boolean — or true/false — capacity to determine whether a confirmation email should be sent for new user signups in Multisite. It defaults to true.

It is evaluated in its namesake function, wpmu_signup_user_notification(), located in wp-includes/ms-functions.php.

The filter accepts four arguments:

  1. string $user The user’s login name
  2. string $user_email The user’s email
  3. string $key The activation key from wp_signup_user()
  4. array $meta By default, an empty array

If $user is not empty, the filter returns a value of true. Core uses the filter in just this capacity to disable sending a signup email when the ‘Skip Confirmation Email’ checkbox is selected on the Users > Add New screen.

Example:

Let’s say we only want to disable the user confirmation email for users who don’t have a Gmail address. We’ll test the user email for signs of Gmail and return false if we find it.