Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Heateor Support

    (@heateor)

    Yes, to fire your own code on login (using Social Login), use following hook defined in wp-content/plugins/super-socializer/inc/social_login.php file:
    do_action('the_champ_login_user', $userId, $profileData, $socialId, $update);
    To fire your own code on new user registration (using Social Login), use following hook defined in the same file:
    do_action('the_champ_user_successfully_created', $userId, $userdata, $profileData);

    So i can use it like that in my function.php?

    add_action( 'the_champ_user_successfully_created', 'user_successfully_created' );
    function user_successfully_created(){
        echo  $userId . $userdata . $profileData;
    }
    Plugin Contributor Heateor Support

    (@heateor)

    Correct way is following:

    add_action( 'the_champ_user_successfully_created', 'user_successfully_created', 10, 3 );
    function user_successfully_created( $userId, $userdata, $profileData ) {
        echo  $userId . $userdata . $profileData;
    }

    But echoing these would not work as this will be executed during AJAX request.

    Oky, was just an example 🙂
    Thx.

    Best Regards

    Plugin Contributor Heateor Support

    (@heateor)

    Okay. You’re welcome 🙂

    Works perfect 🙂
    Thank’s for your help.

    Plugin Contributor Heateor Support

    (@heateor)

    Great 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Trigger own code if user login/user’ is closed to new replies.