开发者

reset user password using only email

I am using asp.net built-in login components and I have disabled the security question and answer and I am trying to allow the user to reset his password using only his email without the need for security question and an开发者_运维百科swer.

Using asp.net 3.5

Thanks in advance


You can use the ChangePassword class that is a ready to use form <asp:changepassword or you can use code to manual reset and change the password of your user.

        MembershipUser mu = Membership.GetUser(UserIdToChangePass);

        if (mu != null)
        {
            string sTempPassword = mu.ResetPassword();
            mu.ChangePassword(sTempPassword, txtNewPasswordFromUser.Text);                
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜