Codex tools: Log in
Contents |
This hook allows you to access data for a new user immediately after they are added to the database. User id is passed to hooked functions as an argument.
This hook is located in `/wp-includes/user.php`, near the end of `wp_insert_user()`
<?php add_action( 'user_register', 'function_name' ); ?>
function function_name($user_id) {
global $wpdb;
/* your action */
}
add_action( 'user_register', 'function_name');?>