Import md5 passwords

Discussion in 'aMember Pro v.4' started by gogoseo, Jan 10, 2013.

  1. gogoseo

    gogoseo Member

    Joined:
    Nov 17, 2012
    Messages:
    36
    I have my users stored in CSV with md5 passwords.
    Is there a way i could use those passwords in amember?

    I tried to import but passwords didnt work.
    Then i tried to manually change the "pass" value in database to correct hash. Also didnt work.
  2. gogoseo

    gogoseo Member

    Joined:
    Nov 17, 2012
    Messages:
    36
    Hmm...i have an idea. Maybe i can import those md5 passwords in a "normal" way and then just change the validation code(for login). I would add an additional OR statement for validation where i would md5 code the password before i check it with amember.

    Would this work? How could i do that? Is there a hook to do this?
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes this would work.
    You would need to modify /amember/application/default/models/User.php function checkPassword($pass)

    We also plan to add such fnctionality into the core :
    http://bt.amember.com/issues/604

Share This Page