21 March 2013

Recover The User Forgotten Password Without Sending The New Password To His E-mail (for security reason)

If you want to create a simple way to recover the forgotten password of the user, but you don't want to send a new password to his or her e-mail maybe for security purpose, here's a simple solution:

protected void recoverPassword_SendingMail(object sender, MailMessageEventArgs e)
    {
        e.Cancel = true;
        recoverPassword.SuccessText = e.Message.Body;
    }

No comments:

Post a Comment