Codex

Plugin API/Action Reference/user register

Contents

Description

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.

Location

This hook is located in `/wp-includes/user.php`, near the end of `wp_insert_user()`


Usage

<?php add_action( 'user_register', 'function_name' ); ?>

Example

function function_name($user_id) {
    global $wpdb;
    
    /* your action */
}
add_action( 'user_register', 'function_name');?>

Related