title: How to find OldPassword to let the user change it
body: <p>I'm working on an intranet, I've just added a feature on the user's profile to change his password.</p>
  
  <p>As you can see with the following controller :</p>
  
  <pre><code>[HttpPost]        
      public ActionResult ChangePassword(Employee objToEdit, FormCollection form, LocalPasswordModel model) // Find how to obtain "OldPassword" from AccountModel
      {
          objToEdit.Login = User.Identity.Name;
          string name = objToEdit.FirstName;
          string pwd = form["NewPassword"];
          string confirm = form["ConfirmPassword"];
  
          if (_service.Edit_password(objToEdit, pwd, confirm)) // Checks if NewPassword and ConfirmPassword are the same, and does some syntax checking
          {
              bool changePasswordSucceeded;
              try
              {
                  changePasswordSucceeded = WebSecurity.ResetPassword(WebSecurity.GeneratePasswordResetToken(objToEdit.Login), pwd); // Seems to work                   
              }
              catch (Exception)
              {
                  changePasswordSucceeded = false;
              }
  
              if (changePasswordSucceeded)
              {
                  return RedirectToAction("Index", new { Message = CRAWebSiteMVC.Controllers.AccountController.ManageMessageId.ChangePasswordSuccess });
              }
              else
              {
                  ModelState.AddModelError("", "The current password is incorrect or the new password is invalid.");
              }
              return new RedirectResult(Url.Action("Index"));
          }
          return View();
      }
  </code></pre>
  
  <p>So far, the user just needs to input a New password and a confirmation password. I wish to add a "Enter your current Password" feature but I <strong>can't find a way to retrieve the user's current password !</strong></p>
  
  <p>The user profile DB does not contain a Password column anymore and I use Form authentication if that's of any help.</p>
  
  <p>EDIT: Thank you for your help, to solve my problem I simply replaced the ResetPassword line by the following :</p>
  
  <pre><code>changePasswordSucceeded = WebSecurity.ChangePassword(objToEdit.Login, current, pwd);
  </code></pre>
  
  <p>If it fails, it directly displays the error message that the current password is wrong.</p>