Is there a hook in WP to access meta data of a user JUST after they have registered and meta data has been added to the database?
I was reading to use profile_update
, but wouldn’t that be invoked every time they update their profile? I just want something to occur the moment that they have registered, and the users meta has been entered in to the database.
Please let me know,
Thanks!
Tre
1 Answer
You can use user_register
add_action('user_register', 'wpse42506_user_register', 10, 3);
function wpse42506_user_register( $user_ID ) {
// do stuff here
}
If you want to just use the user information, you can use get_userdata
http://codex.wordpress.org/Function_Reference/get_userdata
If you need more control, you can initiate a new WP_User
http://codex.wordpress.org/Class_Reference/WP_User