Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jhrs21

    (@jhrs21)

    Problem found!

    This code for autologin was the problem:

    function auto_login_new_user( $user_id ) {
            wp_set_current_user($user_id);
            wp_set_auth_cookie($user_id);
                // You can change home_url() to the specific URL,such as
            wp_redirect( home_url() );
            exit;
    }
    //add_action( 'user_register', 'auto_login_new_user' );

    Does anyone know the reason?

    Plugin Author AntoineH

    (@antoineh)

    My plugin also hooks into the user_register action. You can try setting the priority for the other plugin to something higher than my plugin, so that hook is executed later.

    add_action( 'user_register', 'auto_login_new_user', 20 );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Users don't register in league’ is closed to new replies.