I have a function that has an add_action inside it that calls the user_register hook. I would like to be able to echo the variable $user_id from the user_register hook and the $_POST array as well. (Ok, my goal is to do more than that, but you get the idea). See below:
function my_function{
add_action( 'user_register' .....
.
.
.
echo $user_id;
var_dump ($_POST);
.
.
.
}
How might I accomplish this?
I realize this is probably really simple but examples that I've seen haven't used an add_action inside another function.
Thanks for any help.