-
Hello,
I need the pass some info to a newsletter, when an user register, can you point me an hook for that?
The “userpro_after_profile_updated” works perfectly, when i update one profile, i need one for new userThanks, Jorge LIma
Hello I am desperately trying to use Hooks, but I don’t understand how to do it.
I am trying to add hooks to “function.php” in my theme, but I don’t know the correct syntax.
Can you give me a very simple working example of this hook, please:
do_action(‘userpro_after_new_registration’, $user_id);
Sorry for my stupid question, but I am going mad.
Thanks
function after_registration_process($user_id) {
// get user info
$user_info = get_userdata($user_id);
$username = $user_info->user_login;
$display_name = $user_info->display_name;// do something using the user info
}
add_action(‘userpro_after_new_registration’, ‘after_registration_process’);@corre ,
Thank you for the help !Please feel free to let us know if there is anything else we can do to help you.Hello Corre,
I tried to add this code to my function.php theme’s file, but nothing happens…the file is not created… Any ideas, please? THANKS
global $userpro;
function after_registration_process($user_id) {
// get user info
$user_info = get_userdata($user_id);
$username = $user_info->user_login;
$display_name = $user_info->display_name;$myfile = fopen(“newfile.txt”, “w”) or die(“Unable to open file!”);
fwrite($myfile, $display_name);
fclose($myfile);}
add_action(‘userpro_after_new_registration’, ‘after_registration_process’);
You must be logged in to reply to this topic.