wp_send_new_user_notifications

The timeline below displays how wordpress function wp_send_new_user_notifications has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Initiates email notifications related to the creation of new users.
 *
 * Notifications are sent both to the site admin and to the newly created user.
 *
 * @since 4.4.0
 * @since 4.6.0 Converted the `$notify` parameter to accept 'user' for sending
 *              notifications only to the user created.
 *
 * @param int    $user_id ID of the newly created user.
 * @param string $notify  Optional. Type of notification that should happen. Accepts 'admin'
 *                        or an empty string (admin only), 'user', or 'both' (admin and user).
 *                        Default 'both'.
 */
function wp_send_new_user_notifications($user_id, $notify = 'both')
{
    wp_new_user_notification($user_id, null, $notify);
}

WordPress Version: 4.4

/**
 * Initiate email notifications related to the creation of new users.
 *
 * Notifications are sent both to the site admin and to the newly created user.
 *
 * @since 4.4.0
 *
 * @param int    $user_id ID of the newly created user.
 * @param string $notify  Optional. Type of notification that should happen. Accepts 'admin' or an empty string
 *                        (admin only), or 'both' (admin and user). Default 'both'.
 */
function wp_send_new_user_notifications($user_id, $notify = 'both')
{
    wp_new_user_notification($user_id, null, $notify);
}