Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Miled

    (@miled)

    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

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

    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.

    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);
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hook/Filter after user is created’ is closed to new replies.