WordPress Social Login
[resolved] Hook/Filter after user is created (5 posts)

  1. latinosamorir
    Posted 3 years ago #


    I'd like to change the user_status field in the wp_users table to some # after the user gets created with WSL.

    I tried looking through the code but I'm not expert and could not find a do_action hook to make the change.

    Can you please advice?

    Thank you,


  2. Miled
    Plugin Author

    Posted 3 years ago #

    as far as i know the "user_status", may he rest in peace, cannot be set in wp_insert_user and therefore not by the wsl hook

    however, and to solve this kind of issue, i will add another hook to trigger right after a user created

  3. Info Man
    Posted 3 years ago #

    what about the hook wp_login it is called when you login via this plugin!

  4. Gabriel Ajabahian
    Posted 3 years ago #

    the wp_login hook is not called after the connect.

    I did some research and thats how i resolved my issue:

    add_action('wsl_hook_process_login_before_redirect',  'wplogin_myplugin_afterconnect', 10, 3);
    function wplogin_myplugin_afterconnect($user_id, $provider, $hybridauth_user_profile){
        update_user_meta($user_id, 'last_login', current_time('mysql'));

    This is a small example i hope it helps.

  5. Gabriel Ajabahian
    Posted 3 years ago #

    Or you can trigger the action wp_login.

    add_action('wsl_hook_process_login_before_redirect',  'wplflogin_afterconnect', 10, 3);
    function wplflogin_afterconnect($user_id, $provider, $hybridauth_user_profile){
        $user_login = get_userdata($user_id);
        do_action('wp_login', $user_login->user_login);

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Social Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic