• Resolved traings

    (@traings)


    Hi,
    Need to cancel redirection after login.
    I have a plugin redirecting users depending on their characteristics (not their roles). I need to cancel UM’s function that is redirecting (or refreshing) the user after login.
    What code should I include in my child theme functions.php to do it?
    Thanks a lot
    Ricardo

    • This topic was modified 3 years ago by traings.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @traings

    You can try attaching your function to this action hook:
    do_action( 'um_on_login_before_redirect', um_user( 'ID' ) );

    e.g.

    add_action("um_on_login_before_redirect","um_040521_prevent_redirection");
    function um_040521_prevent_redirection( $user_id ){
        // do something
        exit;
    }
    

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. …Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

    Thread Starter traings

    (@traings)

    Hi Champ,
    Sorry for the delay in answering you.
    I have been evaluating a totally different site before testing your solution and making a decision.
    With the new installation, I do not have the need I requested you anymore.
    I will keep your info anyway in case in the future appears again.
    Thanks for your answer.
    Ricardo

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need to cancel redirection after login’ is closed to new replies.