wp_send_new_user_notifications

Advertisement

Summery Summery

Initiates email notifications related to the creation of new users.

Syntax Syntax

wp_send_new_user_notifications( int $user_id, string $notify = 'both' )

Description Description

Notifications are sent both to the site admin and to the newly created user.

Parameters Parameters

$user_id

(int) (Required) ID of the newly created user.

$notify

(string) (Optional) Type of notification that should happen. Accepts 'admin' or an empty string (admin only), 'user', or 'both' (admin and user).

Default value: 'both'

Source Source

File: wp-includes/user.php

}

/**

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 Converted the $notify parameter to accept 'user' for sending notifications only to the user created.
4.4.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.