• Im using the hook user_register:

    add_action(‘user_register’,’plugin_post’,10,3);

    so it grabs the user ID when a new user registers.
    Then using this function I can bring back the new users data:

    function plugin_post($id){
    $user_info = get_userdata($id);
    }

    but the user meta data is set in the wp_meta table after this register function has happened, so im unable to get to the users first name and last name. Does anyone know a hook I can use which runs when they register, but is after the user meta data has been added?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Try using: “add_filter” instead of “add_action”

    function display_user_info($user_id) {
    $user_info = get_userdata($user_id);
    echo "<pre>: ";
    print_r($user_info);
    echo "</pre>";
    exit;
    }
    add_filter('profile_update','display_user_info',99);
Viewing 1 replies (of 1 total)
  • The topic ‘add_action using “user_register”, but cant get out user_meta data’ is closed to new replies.