Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to redirect users to their profile after they edit their profile


  • Tim2376
    Participant

    @tim2376

    Hi Guys,

    I was wondering, how can I redirect users to their profile after they save the edits to their profile page? Basically, when a user edits their profile page it shows a message that says something like “changes saved” but it is still on the edit page.

    I would like it to redirect to the user’s profile page so they can see the changes after they click the save changes button and it was successful.

    If anyone has any ideas for me that would be great. Thanks!

Viewing 1 replies (of 1 total)

  • Tim2376
    Participant

    @tim2376

    Alright, I figured it out. Here is the code that works…

    add_action( 'xprofile_updated_profile', 'SaveEditsRedirect', 12 );
    function SaveEditsRedirect() {
    global $bp;
    wp_redirect( $bp->loggedin_user->domain );
    exit;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘How to redirect users to their profile after they edit their profile’ is closed to new replies.
Skip to toolbar