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

Initiates email notifications related to the creation of new users.


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

Top ↑


$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 'both'.

Default: 'both'

Top ↑


File: wp-includes/user.php. View all references

function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
	wp_new_user_notification( $user_id, null, $notify );

Top ↑


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

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.