Just Say No. Emailing the old password requires the password to be encrypted (rather than hashed as with password() or md5()). Instead, just make up a new random password and send it to them. If you're cautious, you will also add a few other checks to make denial-of-service attacks at least a little bit hard.