forced repeat login

Discussion in 'Troubleshooting' started by techhead, Jul 10, 2004.

  1. techhead

    techhead Guest

    I am using the form code from aMember control panel to create a login form on the site. However, instead of passing it through and loging in, I end up at the login screen and have to enter user and password again. How can this be corrected?

    Also, does amember prefer login at the /amember/member.php or the /amember/login.php
  2. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    forced duplicate log-in

    I have the same problem... .but don't see solution posted here. Is there one?
  3. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    more info

    found more about this in the forum:

    question:
    When a user enters login/password info on the member.php page, they are directed to the subscription link page; when they click on a product link, they are asked for their login/password again.

    alex's answer:

    *it is now impossible to avoid popup login box while you are using htpasswd protection*.

    so, we are NOT using htpasswd protection, and yet, this scenario continues to happen -- any solutions?

    thanks
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    please post your login form html code here - there is an error in the form!
  5. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    thanks, alex... the natives are getting restless

    {assign var="title" value="Please Log In"}
    {include file="header.html"}

    <div class=hdr>{$title}</div>

    {if $error}
    <br>
    <span class="color">{$error}</span>
    <br><br>
    {/if}

    <form name=login method=post {if $form_action}action="{$form_action}"{/if}>
    <table class=vedit align=center>
    <tr>
    <th><b>Username</b></th>
    <td><input type=text name=amember_login style="color:#05023c; background:#fff; font:11px Verdana,Arial;" size=15 value="{$smarty.request.amember_login}"></td>
    </tr>
    <tr>
    <th><b>Password</b></th>
    <td><input type=password name=amember_pass style="color:#05023c; background:#fff; font:11px Verdana,Arial;" size=15></td>
    </tr>
    <input type=hidden name=login_attempt_id value={php}print time();{/php}>
    {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><small>Remember my login
    </small>
    </td>
    </tr>
    {/if}
    {if $redirect_url}
    <input type=hidden name=amember_redirect_url value="{$redirect_url|escape}">
    {/if}
    </table><br />


    :)
  6. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    login.php error on logging in also....

    so,.. just updated my site, added products -- no changes to templates (incl login) however, now when a member logs in, there is a blip page just before logging in regarding a parsing error on line 28 of login.php.... can't slow it down to read fully.

    again, we did not change any of the login templates.

    thanks again.
  7. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    mstory,
    please read aMember Pro manual - it clearly states how to add login form anywhere on your website. Nothing close to your code.
  8. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    Alex,

    the only difference is that I added some styling, nothing more. (didn't change any of the basic code).

    but, I'll look at it and play around with it.

    Michal
  9. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    duplicate login requests + login.php error

    Alex,

    1) So, last code posted was entire login.html page (from templates) Everything good. Just added styling.

    So if you were looking for just the code to log in from each page:

    <form method="post" action="/amember/login.php">
    User: <input type="text" style="color:#05023c; background:#b8c4d8; font:11px Verdana,Arial;" size="25" name="amember_login" /><br />

    <br />
    Password: <input type="password" style="color:#05023c; background:#b8c4d8; font:11px Verdana,Arial;" size="25" name="amember_pass" /><br />
    <br />
    <input type="submit" value="log in" style="color:#05023c; background:#b8c4d8; font:11px Verdana,Arial;" />
    </form>​

    Previously, had hard-coded path ( /amember/login.php), and changed to relative. So, we'll see if that stops the duplicated requests for log-in.

    2) :confused: Wonder what is up with the login.php, though?

    We added a few new products; NO change to login.html ( template ), and now get this error with every login:

    Warning: usort(): Invalid comparison function. in /home/mysite/path_tosite/amember/login.php on line 28

    ( We did not have this error before adding products )

    After the error displays for about 2 secs, the log in completes...

    Since I cannot access code on the php pages, any help you can provide is welcome!

    [ Posting this in forum in case it helps others encountering such problems :) ]
  10. mstory

    mstory New Member

    Joined:
    Aug 5, 2004
    Messages:
    12
    things okay now

    Alex,

    Thanks for helping me out with this through your online help :)

    Everything looks good now.

    ms
  11. vbskinz

    vbskinz New Member

    Joined:
    Feb 12, 2003
    Messages:
    22
    I am getting the exact same error

    Warning: usort(): Invalid comparison function. in /home/virtual/site203/fst/var/www/html/members/login.php on line 28

    What did you have to do to fix it?
    Thanks.
  12. vbskinz

    vbskinz New Member

    Joined:
    Feb 12, 2003
    Messages:
    22
  13. thescientist

    thescientist Guest

  14. flashclick

    flashclick New Member

    Joined:
    May 8, 2007
    Messages:
    4
    unfortunately, the links dont work....

Share This Page