On this page
wp_send_new_user_notifications( int $user_id, string $notify = 'both' )
Initiates email notifications related to the creation of new users.
Description
Notifications are sent both to the site admin and to the newly created user.
Parameters
$user_idint Required-
ID of the newly created user.
$notifystring 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'
Source
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 );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_new_user_notification() wp-includes/pluggable.php | Emails login credentials to a newly-registered user. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_send_new_user_notifications