예제 #1
0
        public ActionResult ResetPassword(vmAccountLostPassword model)
        {
            System.Threading.Thread.Sleep(10000);

            if (ModelState.IsValid)
            {
                MembershipUser u = Membership.GetUser(model.Email, false);
                if (u != null)
                {
                    string SuccInd = u.ResetPassword();
                    TempData[SuccInd.Substring(0, 5) != "Error" ? "Success" : "Error"] = SuccInd;
                    return(View());
                }
                else
                {
                    db_Ref.InsertT_OE_SYS_LOG("EMAIL ERR", "Unable to retrieve user with email: " + model.Email);
                }
            }
            else
            {
                db_Ref.InsertT_OE_SYS_LOG("EMAIL ERR", "Model state not valid sending reset email to: " + model.Email);
            }

            //if got this far, error
            TempData["Error"] = "Error resetting EECIP password.";
            return(View());
        }
예제 #2
0
        public ActionResult ResetPassword(vmAccountLostPassword model)
        {
            System.Threading.Thread.Sleep(10000);

            if (ModelState.IsValid)
            {
                MembershipUser u = Membership.GetUser(model.Email, false);
                if (u != null)
                {
                    string SuccInd = u.ResetPassword();
                    TempData[SuccInd.Substring(0, 5) != "Error" ? "Success" : "Error"] = SuccInd;
                    return(View());
                }
            }

            //if got this far, error
            TempData["Error"] = "Error resetting password.";
            return(View());
        }