What happend to signup.php?

Discussion in 'Troubleshooting' started by dan_kelly, Jun 15, 2009.

  1. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    In my install of v3.0.8, when an existing user came to my signup form, if they entered their username and password correctly, they were taken to my payment page.... EXACTLY what should happen, IMHO.

    I just installed v3.1.8 for a client, and when a returning user enters their information, the get an error: "That username is already taken. Please choose another username."

    How do I get it back to the way it should be?

    Thanks,
    Dan

    EDIT: What the!? I went back and tested my existing install, and I'm getting the same error now. I could have sworn it worked.

    Now I need to fix it on two sites. Please help, asap.

    EDIT2: I search all my aMember files (v3.1.8) and I cannot even find that exact error text. I find 2 that are close in en.php; but neiter of them start with "That username is already taken.".

    Can someone tell me where this error is triggered?
  2. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    543
    dude, you can't use signup.php page with the same username that already exists in the system... you'll get that error on any version.
  3. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    I could have SWORN it worked on my system in the past.

    And, it most certainly does work on Marlon Sanders' install.

    Maybe he had a programmer fix the code.

    But, that's how it should work, and that's how I thought it worked.

    I'd love to know if anyone has fixed this problem and how.
  4. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    UPDATE: In version 3.0.8 the solution is simple.

    In mysql.inc.php, there is a line:

    if ($config['allow_second_signup'] && $this->get_user_payments($member_id, 1)) return $member_id;

    I couldn't find a setting for "allow_second_signup", so I removed that tiny piece of code. Now it looks like this:

    if ($this->get_user_payments($member_id, 1)) return $member_id;

    Everything is good in v3.0.8 now.

    ---

    but, in v3.1.8 THIS DOESN'T FIX THE PROBLEM.

    There is another check somewhere else that triggers a different $error[] value... the one I can't find.
  5. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    After some more digging, I had added an error handler because the aMember text did not work in one of the locations...

    But, with the fix I mentioned, it's not neccessary.

    So, removing that little check for "allow_second_signup" works in both versions.

    Sweet!


    PROBLEM SOLVED.
  6. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    FYi...

    There is one problem with this... (probably why the setting is hidden.)...

    The "Disallow subscription to this product if the following conditions meet and user has:" check does not get run.

    That is, the user is allowed to make a second purchase of the same product, despite the rules that you've setup to prevent this.
  7. dan_kelly

    dan_kelly New Member

    Joined:
    Aug 29, 2006
    Messages:
    91
    The "trial group" check does work... after the user enters their credit card info... I guess this is better than nothing.

    But, the check should be done before they are taken to the CC page.
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    "Disallow subscription" check does not work on signup for existing users because as miso said, existing users should not use signup page to purchase another memberships.
    There was a bug in some aMember versions so that was allowed, but it was fixed.
    If you need to add this check, please contact support we can make such modification.

Share This Page