忘记密码屏幕 [英] Forgot Password Screen

查看:78
本文介绍了忘记密码屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想使用电子邮件ID验证创建忘记密码"屏幕.

怎么办?

在此先感谢.

Hi,

I want create Forgot password screen using Email ID validation.

How to do?

Thanks in Advance.

推荐答案

一篇不错的文章 ^ ]
One quite nice article Improved ASP.NET Password Recovery[^]


密码恢复在asp.net


忘记密码

添加文本框以输入用户名或电子邮件
在我们的数据库中应该是唯一的

在我们的用户表中添加一列"passwdresetKey"

当用户输入他的用户ID或电子邮件ID时
然后在我们的数据库中检查用户或电子邮件的存在性
如果存在,则
创建一个Guid字符串作为passwdresetKey并在数据库中对其进行更新
(引导字符串也应该是唯一的)

并使用"passwdresetKey"的查询字符串值创建重置密码"页面的链接
(您也可以在第二个查询变量中添加userid)

并将其发送给用户
(出于安全目的,您可以加密查询字符串)

当用户点击此

我们的重置密码页面检查guid和用户ID,如果...

如果正确,则显示两个文本框输入新密码并确认密码,以便用户可以更改密码

使用旧版本更新密码,并将passwdresetKey更新为空白

这是您可以遵循的过程
in forgot password

add a textbox to input userid or email
which should be uniqre in our database

add a column "passwdresetKey" in our user table

when user input his userid or emailid
then check user or email existance in our database
if it exist then
create a guid string as a passwdresetKey and update it in database
(guid string should also unique)

and create a link of reset password page with query string value of passwdresetKey
(you can add userid also with second query variable)

and send it mail to user
(you can encrypt query string for security purpose)

when user click on this

our reset password page check guid and user id if ...

if it correct then show two textbox for new password and confirm password that user can change password

update password with old and update passwdresetKey as blank

this is the process you can follow


这篇关于忘记密码屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆