Function: wp_send_new_user_notifications

wp_send_new_user_notifications( integer $user_id, string $notify )

Initiates email notifications related to the creation of new users.

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


Name Type(s) Default Value Description
$user_id integer

ID of the newly created user.

$notify string 'both'

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

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.