redirect after login

Discussion in 'Customization & add-ons' started by Stim_Pey69, Mar 25, 2009.

  1. ciorici

    ciorici New Member

    Joined:
    Feb 4, 2010
    Messages:
    6
    Hi everyone!

    Can someone tell me how to redirect user after his first log in after purchase directly to Membership Dashboard, instead of protected area folder?

    Thanks
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Change link in thanks.html from login.php to member.php user always will be redirected to member's area from thanks.php page.
  3. tubby

    tubby New Member

    Joined:
    Feb 27, 2010
    Messages:
    12
    ok, i'm confused. here is the is existing code...

    Code:
    <form name="login" method="post" {if $form_action}action="{$form_action}"{/if}>
    
    <table class="vedit" >
        <tr>
            <th>#_TPL_LOGIN_USERNAME#</th>
            <td><input type="text" name="amember_login" size="15" value="{$smarty.request.amember_login|escape}" /></td>
        </tr>
        <tr>
            <th>#_TPL_LOGIN_PASSWORD#</th>
            <td><input type="password" name="amember_pass" size="15" /></td>
        </tr>
        {if $this_config.remember_login && !$this_config.remember_auto}
        <tr>
            <td colspan="2" style='padding:0px; padding-bottom: 2px;'>
    <input type="checkbox" name="remember_login" value="1">
    <span class="small">#_TPL_LOGIN_REMEMBER_MY_PASSWORD#</span>
            </td>
        </tr>
        {/if}
    </table>
    <input type="hidden" name="login_attempt_id" value="{php}print time();{/php}" />
    {if $redirect_url}
        <input type="hidden" name="amember_redirect_url" value="{$redirect_url|escape}" />
    {/if}
    <br />
    
    <input type="submit" value="&nbsp;&nbsp;&nbsp;#_TPL_LOGIN_BTN_LOGIN#&nbsp;&nbsp;&nbsp;" />&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="button" value="&nbsp;&nbsp;&nbsp;#_TPL_LOGIN_BTN_BACK#&nbsp;&nbsp;&nbsp;" onclick="history.back(-1)" />
    </form>
    how do i alter it so that the person is redirected back?
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    In most cases you don't need to change code in template.
    Please explain what you need to do exactly.
  5. tubby

    tubby New Member

    Joined:
    Feb 27, 2010
    Messages:
    12
    @alexander - it's a sessions issue. i thought it had something to do with the redirection but that doesn't appear to be the case.

    thanks
  6. jlingk

    jlingk New Member

    Joined:
    Sep 16, 2008
    Messages:
    1
    Really, mine just redirects to the root of my domain. It completely ignores the product URL.
  7. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Are you logging in from member.php or login.php, have you edited the login.html template?

    David

Share This Page