Fires immediately after a new user is registered.
$user_idint
$userdataarray
ID intuser_pass stringuser_login stringuser_nicename stringuser_url stringuser_email stringdisplay_name stringnickname stringfirst_name string$display_name is not specified.last_name string$display_name is not specified.description stringrich_editing string'true' or 'false' as a string literal, not boolean. Default 'true'.syntax_highlighting string'true' or 'false' as a string literal, not boolean. Default 'true'.comment_shortcuts string'true' or 'false' as a string literal, not boolean. Default 'false'.admin_color string'fresh'.use_ssl booluser_registered stringuser_activation_key stringspam boolshow_admin_bar_front string'true' or 'false' as a string literal, not boolean. Default 'true'.role stringlocale stringmeta_input arrayThis action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument.
Not all user meta data has been stored in the database when this action is triggered. For example, nickname is in the database but first_name and last_name are not (as of v3.9.1). The password has already been encrypted when this action is triggered.
Typically, this hook is used for saving additional user meta passed by custom registration forms.
do_action( 'user_register', $user_id, $userdata );
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/user_register