PHP Classes

Lost password

Recommend this page to a friend!

      Access user Class  >  All threads  >  Lost password  >  (Un) Subscribe thread alerts  
Subject:Lost password
Summary:Problem with multiple instances of same password
Messages:6
Author:Martin Samler
Date:2005-01-31 19:49:50
Update:2005-02-01 10:07:28
 

  1. Lost password   Reply   Report abuse  
Picture of Martin Samler Martin Samler - 2005-01-31 19:49:50
Hi,

it seems that if there are more users with the same password, the check_user method will fail (return mysql_result($result, 0, "test")>1).
To resolve it, the 'new_pass' case could compare the Id as well.

Also, I am wondering about the "new e-mail" function. The validation e-mail links to the login_page, but the 'validate-email' method is never called?

Maybe I've turned PHP-blind and messed it all up...

  2. Re: Lost password   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-01-31 20:27:01 - In reply to message 1 from Martin Samler
Hallo Martin,

You are right I see a problem in this method: activate_new_password()
because there will the first (found) password be updated.

Is this the behavior you mean?

about the mail/login question

while register a user, a mail with message 29 is send, this is send to the new user and he must activate on the login page, is it this what you mean?

I will fix the problem with the "double" password.

  3. Re: Lost password   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-01-31 21:53:07 - In reply to message 2 from Olaf Lederer
Martin,

The problem with the double passwords should be resolved...

The files here on phpclasses are not updated yet, but the class on my website is up2date.

PS. Please tell me more about your other question.

  4. Re: Lost password   Reply   Report abuse  
Picture of Martin Samler Martin Samler - 2005-01-31 23:32:44 - In reply to message 3 from Olaf Lederer
Olaf,
if there are more users with the same password check_user will return FALSE.
What is worse: If a user updates his password, all identical passwords will also be updated. I believe the method activate_new_password needs to take id as a third parameter.

About the e-mail change, I just can't get it to work. I cannot spot why the link and the login page would call the validate_email method, as I assume it should. I'll take another look tomorrow, when I can see straight :P

  5. Re: Lost password   Reply   Report abuse  
Picture of Martin Samler Martin Samler - 2005-01-31 23:35:43 - In reply to message 2 from Olaf Lederer
The problem is not with registering, but with e-mail change (message 33).

  6. Re: Lost password   Reply   Report abuse  
Picture of Olaf Lederer Olaf Lederer - 2005-02-01 10:07:28 - In reply to message 5 from Martin Samler
Hallo,

about the email-update/validation:
I see, there was no method called in login.php, I changed this.

I will update the files here later this day...(in the meantime find the changed files on my website)

Martin, thanks for reporting this bugs.