Wordpress Hook for Social Link

Hi,

I want to add an action to take place after a user connects another social identity to their account. However, I've scoured the codebase and documentation for even a single mentioning of a hook for when a user connects through Social Link (not Social Login!), but couldn't find anything.

If there is a hook that will activate on either registration/login/link, that can work too. Let me know which one does. Your documentation lacks any indicators for whether the hooks will activate when Social Link is used. It presumes only Social Login will be used.

I've tried using 'oa_social_login_action_before_user_insert', which I read in another thread activates on both registration and login, but it didn't activate when linking another social identity through Social Link.

Please help me figure out a way to hook into Social Link's logins. Thanks.

Best Answer

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    edited July 2018 Answer ✓

    Hi Jeffrey,

    sorry I misread your first post.

    Here the called actions:

    do_action ('oa_social_login_action_after_user_link', $user->data, $data->user->identity, $userid_by_token);
    
    do_action ('oa_social_login_action_after_user_unlink', $user->data, $data->user->identity, $userid_by_token);
    

Answers

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team

    Hi Jeffrey,

    please have a look here:
    http://docs.oneall.com/plugins/guide/social-login-wordpress/#4b

    Regards,

  • edited July 2018

    That is a Shortcode, not an Action or a Filter. That doesn't help me at all.

    I need some hook that will activate when a user links an account THROUGH the Social Link Shortcode on display. So I don't need a hook to the Social Link container itself, I need one for the actions that occur inside of/from it.

  • Thank you, that worked. Using it in conjunction with before_user_insert, I am able to act whenever a user signs in, registers a new account, or links a new social identity.

    Why is that action nowhere to be found in the documentation? If it isn't there, please include it. And your documentation can use improvements by presenting all Wordpress hooks in a list, where the parameters for each, what they're for, and when they activate, are listed out clearly. What you guys have right now is a scattered mess of incomplete, arbitrary 'answers to questions'.

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.