Function: wp_new_user_notification

wp_new_user_notification( integer $user_id, null $deprecated, string $notify )

Email login credentials to a newly-registered user.

A new user registration notification is also sent to admin email.


Name Type(s) Default Value Description
$user_id integer

User ID.

$deprecated null null

Not used (argument deprecated).

$notify string ''

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

WordPress Developer Newsletter

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