wp_new_user_notification( int $user_id, null $deprecated = null, string $notify = '' )

Emails login credentials to a newly-registered user.

Description

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

Parameters

$user_idintrequired
User ID.
$deprecatednulloptional
Not used (argument deprecated).

Default:null

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

Default:''

More Information

  • This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead.