ABsoluteMaybe.SampleWebsite.MVC2.Controllers.AccountController.ChangePassword C# (CSharp) Method

ChangePassword() private method

private ChangePassword ( ChangePasswordModel model ) : System.Web.Mvc.ActionResult
model ABsoluteMaybe.SampleWebsite.MVC2.Models.ChangePasswordModel
return System.Web.Mvc.ActionResult
        public ActionResult ChangePassword(ChangePasswordModel model)
        {
            if (ModelState.IsValid)
            {
                if (MembershipService.ChangePassword(User.Identity.Name, model.OldPassword, model.NewPassword))
                {
                    return RedirectToAction("ChangePasswordSuccess");
                }
                else
                {
                    ModelState.AddModelError("", "The current password is incorrect or the new password is invalid.");
                }
            }

            // If we got this far, something failed, redisplay form
            ViewData["PasswordLength"] = MembershipService.MinPasswordLength;
            return View(model);
        }

Same methods

AccountController::ChangePassword ( ) : System.Web.Mvc.ActionResult