How hard to make a password recovery script?

Discussion in 'PHP' started by photosales.co.nz, Jul 2, 2007.

  1. #1
    Hi there people.

    I am trying to find out some code, or even a script I would be able to use for our website members if they forget their password, they can just request that it get's sent to their email.

    The passwords are not stored encripted in the database, so just need to pull that line for the email supplied and email to that address.....

    Is that hard?
     
    photosales.co.nz, Jul 2, 2007 IP
  2. Bandit09

    Bandit09 Active Member

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    Not hard at all. Mine generates a random link then e-mails it to the user. the user clicks the link and then they can change their password.
     
    Bandit09, Jul 2, 2007 IP
  3. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #3
    or just have them enter their email address and then search for it in the database and then send an email to it containing the password to the email that is stored.
     
    ansi, Jul 2, 2007 IP
  4. photosales.co.nz

    photosales.co.nz Peon

    Messages:
    371
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    All done - thanks - just my head not working properly.
     
    photosales.co.nz, Jul 3, 2007 IP
  5. bucabay

    bucabay Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thats a bit scary...

    Try including a test question at least. Anyone who knows someones email will enter it there and get their password.

    Eg: Scammer gets to know userA on the site, asks for their email, send a password recovery. Log into their bank account, take all their money.
     
    bucabay, Jul 3, 2007 IP
  6. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #6
    exactly why it says to send to the email address that is stored. say i know userA's email address, i enter it, it sends to the email address of userA. no harm done userB can't access it.
     
    ansi, Jul 3, 2007 IP
  7. photosales.co.nz

    photosales.co.nz Peon

    Messages:
    371
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Exactly, and that is how it works. if you put it will email the password to not to
     
    photosales.co.nz, Jul 3, 2007 IP