• Resolved José Arcos

    (@josearcos)


    Hi there, we are using your plugin for 2-factor auth with Google Authenticator. It works great, but we had a redirection configured for certain user role. The code looks like this:

    function redirect_retail_page_based_on_role($user) {
        $user_roles = (array) $user->roles;
        if ( in_array('role-one', $user_roles) ) {
            wp_redirect( home_url() . '/page-one-shop' );
            exit();
        } elseif (in_array('role-two', $user_roles) ) {
    	wp_redirect( home_url() . '/page-two-shop' );
    	exit();
        } else{
            wp_redirect( home_url() );
    	exit();
        }
    }
    add_action('after_password_reset', 'redirect_retail_page_based_on_role', 10, 1 );

    Deactivating the plugin solves the issue, is there anything that we can do for fixing this?

    Thanks.

    • This topic was modified 4 years, 4 months ago by José Arcos.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author miniOrange

    (@cyberlord92)

    Hi @josearco,

    Thank you for dropping a query.

    Yes, It looks like an easy problem to solve we surely can work on it and get it to function as you want it to. We might need some information on how it works. Can you raise a ticket from the two-factor plugin? It is a Customer support system in the plugin to reach us directly.
    You can also reach out at [email protected] sharing your issue. One of the team developers will get in touch with you and get it working.

    Plugin Author miniOrange

    (@cyberlord92)

    Hi There,

    We have not heard you back.

    Please let me know if you need any assistance with this.
    For now, we are marking this a resolved if you want we can reopen it.

    Also, you can always reach out to us through plugin support.
    We will be really really happy to assist you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_redirect() does not work when the plugin is active’ is closed to new replies.