Sent in Support Ticket - No Response. Posting again- Simple q needed to be answered!

Discussion in 'Integration' started by rhino1234, May 17, 2007.

  1. rhino1234

    rhino1234 New Member

    Joined:
    May 15, 2007
    Messages:
    6
    Posted this here yesterday... also sent in a support ticket. Two actually. Have not heard back. We can't move forward until we get the answer to this question... if anyone can help, please respond here or reply to my ticket. Thank you very much.

    The question:

    When a user logs in, is there a way to redirect them to a page we define as opposed to the default member.php page that shows up?
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Use:
    To redirect users to their subscription page after login use:
    <a href="login.php?amember_redirect_url=http://www.domain.com/amember/member.php">login</a>

    To redirect users to their edit profile page after login use:
    <a href="login.php?amember_redirect_url=http://www.domain.com/amember/profile.php">Edit Profile</a>

    To redirect users to a page of your choice after login use:
    <a href="login.php?amember_redirect_url=http://www.domain.com/my_directory/my_page.php">Page of my choice</a>

    So in theory you can enter any url after amember_redirect_url= command that that will be passed to the browser which will redirect.

    However, I do not like the amember_redirect_url= command and may need to hardcode it becase if the user keeps on clicking on the above link then the redirect command will keep on adding it that many times like a loop.

    It may be better to have a split("amember_redirect_url=", $redirect) and then generate only one to stop the repition.
  3. joe_asto2

    joe_asto2 New Member

    Joined:
    Aug 22, 2006
    Messages:
    68
    A much simpler solution is to edit login.php

    On the last line of login.php, find the code:

    PHP:
    html_redirect("$redirect"0'Redirect'_LOGIN_REDIRECT);
    You can replace $redirect with whatever you want.

    ($redirect variable can also be populated with your value via the login URL like this: login.php?amember_redirect_url=XXX, as draj explained)

    Sending 2 support tickets isn't going to get you help any quicker, it'll just annoy support staff. Please learn some patience.
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    I'm sorry for delay with the tickets, it should not happen anymore.

Share This Page