Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author 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);

    Thread Starter Messaone

    (@messaone)

    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 Author 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.

    Thread Starter Messaone

    (@messaone)

    Oky, was just an example 🙂
    Thx.

    Best Regards

    Plugin Author Heateor Support

    (@heateor)

    Okay. You’re welcome 🙂

    Thread Starter Messaone

    (@messaone)

    Works perfect 🙂
    Thank’s for your help.

    Plugin Author 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.