php forgot password script issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: php forgot password script issue

Post by Celauran »

[text] /**
* New password was generated for user and sent to user's
* email address.
*/[/text]
Ouch. Sending passwords by email? Not a great idea.

That aside,

Code: Select all

         /* Make sure email is in database */
         $subemail = stripslashes($subemail);
         if(!$subemail || strlen($subemail = trim($subemail)) == 0){
            $form->setError($field, "* Email does not exist<br>");
         }
Nowhere does that actually query the database. Compare this against the unmodified version of the function.
Post Reply