Hi @pao2
As for the registration:
By default Nextend Social Login registers the users with the wp_insert_user() function, which fires the “user_register” action at one point meaning that your hooked functions should run when your register with Nextend Social Login, too.
I have just checked it with a basic code like this:
add_action('user_register', function ($id, $data) {
echo "reg:" . $id;
exit;
}, 10, 2);
And when I registered with social login it wrote out the $id just fine, meaning that we got to this point. If it still doesn’t work for you, then maybe you have your hooks hooked into another hook, that is specific for your register flow only, so when the “user_register” action is fired outside of that flow, then your codes won’t run.
Anyways we also have our own action that we fire when a new user is registered with social login:
In our developer documentation you can learn more about it and you can also find examples for the usage if you search for this action in the developer documentation:
As for the user deletion:
The user deletion is not handled by Nextend Social Login at all, but by WordPress ( just when you delete a WordPress account in WordPress, we will also delete the stored social media data automatically ). I have just deleted an account ( registered with Social Login ) in the WordPress default users table, while this code was added:
add_action('deleted_user', function ($id, $reassign, $user) {
echo "del:" . $id;
exit;
}, 10, 3);
and it worked fine.
You should check if you even get to the point where your hooked functions get executed. ( It is a common problem that if you have other codes hooked to an action and it triggers a redirect then the remaining functions ( which were hooked to that particular action ) won’t be executed. )
As for the unlinking:
We have an unlink specific action:
that is fired when a user unlinks a social media account from a WordPress account. In the Developer documentation you can find this action, too.
Best regards,
Laszlo.