本文介绍了如何重置自动生成的密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一张看起来像这样的表
创建 表 用户(
userid varchar ( 20 )主要 密钥,
密码 varchar ( 20 )
);
现在,如果用户忘记了密码,那么我有一个这样的存储过程
create procedure resetpass( @ password varchar ( 20 ), @ userid varchar ( 20 ))
as
update user
set password = @ password 其中 userid = @ userid
但我真正想要的是如果用户忘记了他的密码,那么管理员必须发送一个唯一的代码到他最初设置为密码的注册手机号码。登录后,必须为用户提供重置密码的机会。如何生成唯一密钥并将其发送到注册用户的手机号码?
解决方案
I Have a table which looks something like this
create table user( userid varchar(20) primary key, password varchar(20) );
Now if the user forgets his password then i have a stored procedure like this
create procedure resetpass(@password varchar(20),@userid varchar(20)) as update user set password=@password where userid=@userid
But what i actually want is if a user forgets his password then admin must send a unique code to his registered mobile number which is initially set as his password. After logging in the user must be provided a chance to reset his password. How to generate a unique key and send it to registered user's mobile number?
解决方案
这篇关于如何重置自动生成的密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!