Пример #1
0
        public ActionResult ResetUserPassword(String value)
        {
            if (TempData["SuccessMessage"] != null)
            {
                ViewBag.ShowForm           = false;
                ViewBag.SuccessMessage     = TempData["SuccessMessage"].ToString();
                TempData["SuccessMessage"] = null;
                return(View());
            }

            UserVM _userVM = _userBLL.CheckResetPwdValidity(value);

            ViewBag.UnSuccessMessage = null;
            ViewBag.SuccessMessage   = null;

            if (_userVM != null)
            {
                ViewBag.InvalidURL = null;
                ViewBag.ShowForm   = true;
                UserVM model = new UserVM()
                {
                    ResetToken = value
                };
                return(View(model));
            }
            else
            {
                ViewBag.ShowForm         = false;
                ViewBag.UnSuccessMessage = "Sorry, Invalid URL. It has been expired now. Please try again for new password.";
                return(View());
            }
        }