public ActionResult ForgotPassword(string userName = "") { if (string.IsNullOrEmpty(userName) || UserAccountBLL.FindUserName(userName, UserAccountTypes.Employee) != false) { ModelState.AddModelError("email", "Email expected"); } if (!ModelState.IsValid) { return(View()); } string pass = Helper.EncodeMD5("123456"); UserAccountBLL.ResetPassword(userName, pass, UserAccountTypes.Employee); return(Redirect("SignIn")); }