Redirect from profile after update

Discussion in 'Templates customization' started by swissbliss, Jan 10, 2007.

  1. swissbliss

    swissbliss New Member

    Joined:
    Jul 17, 2006
    Messages:
    3
    Hi

    How can I redirect from a profile update to a page other than member.php.

    I want to return the user to the home page after they have saved a profile change, instead of the Member page.

    Thanks
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Edit file amember/profile.php, replace lines
    html_redirect("member.php", false,
    _TPL_PROFILE_SAVED_TITLE, _TPL_PROFILE_SAVED_SUCCESS);
    to
    html_redirect("/", false,
    _TPL_PROFILE_SAVED_TITLE, _TPL_PROFILE_SAVED_SUCCESS);
  3. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hallo!

    Funny that I just worked on this lines and saw someone asking it here! :)

    I needed to use a OnChange for dropdowns with save event. So the OnChange event handlwer was passing the parameters and thereafter redirecting to the member. page. But the members did not yet filled out the forms completely and should stay there, i.e. the form should not change.

    So what I did is follows:

    html_redirect("profile.php", false,
    _TPL_PROFILE_SAVED_TITLE, _TPL_PROFILE_SAVED_SUCCESS);

    Below there is a button to save the profile of it also says "Back" i.e. Back to memberspage...

    Just an alternative thought.

    However interesting would be to have more options for the redirect here.
  4. swissbliss

    swissbliss New Member

    Joined:
    Jul 17, 2006
    Messages:
    3
    Thanks guys!

    In the end I left it as is, and added a navigation menu to member.html!

    Cheers!

Share This Page