• Resolved benengel052

    (@benengel052)


    Greetings–apologies in advance because I’m not the most experienced web designer, but I’m having difficulty finding a way to change where a user gets sent upon updating their UM profile.

    Currently, when a member is editing their profile and either clicks the check mark, Update Profile, or Cancel, they are routed to their user profile page, whereas I’m looking to route them back to a separate dashboard page I’ve made that contains other integrated info in addition to their profile. I’ve already updated the user role so that when people log in, they are routed to their customized dashboard. This works great; the only issue is when they edit their profiles and accept or cancel, they are sent to their user profile page instead of back to their dashboard.

    I’ve looked into changing the default user page to be the dashboard page I’ve created, but that affects what people see when they click on other members’ profiles. Therefore, I’m looking to keep the user page untouched so only the profile comes up if someone visits someone else’s profile.

    Thanks in advance for any recommendations folks may have. -Ben

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @benengel052

    You can try this code snippet in the link:

    add_action("um_edit_profile_cancel_uri","um_083021_redirect_after_cancel");
    add_filter("um_update_profile_redirect_after","um_083021_redirect_after_cancel");
    function um_083021_redirect_after_cancel( $uri ){
    
        return "/test";
    }

    The above code will redirect the user to /test page after updating the profile and also changes the cancel URL to /test

    Thread Starter benengel052

    (@benengel052)

    Wonderful–that worked perfectly. Thanks so much!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Thanks for letting us know.

    Regards,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Changing URL upon updating profile’ is closed to new replies.