示例#1
0
        public ActionResult ResetPassword(FormCollection form)
        {
            String        userip = this.GetCurrentUserIP();
            IMethodResult result = UserForgetPasswordManager.ResetUserPassword(form["rid"], form["username"], form["password"], form["password2"], userip);

            this.LogUserOperation(result);

            if (!result.IsSuccess)
            {
                return(RedirectToErrorMessagePage(result.Description));
            }

            return(RedirectToSuccessMessagePage("Your password was updated successfully!"));
        }
示例#2
0
        public async Task <ActionResult> ForgetPassword(FormCollection form)
        {
            String userip = this.GetCurrentUserIP();
            String link   = Url.Action("ResetPassword", "User") + "?rid=";

            IMethodResult result = await UserForgetPasswordManager.RequestResetUserPassword(form["username"], form["email"], userip, form["checkcode"], link);

            this.LogUserOperation(result);

            if (!result.IsSuccess)
            {
                return(RedirectToErrorMessagePage(result.Description));
            }

            return(RedirectToSuccessMessagePage("We have sent a password reset link to your email address, the link is valid for 24 hours."));
        }
示例#3
0
 public ActionResult ResetPassword(String rid)
 {
     return(View(UserForgetPasswordManager.GetUserForgetRequest(rid)));
 }