ChangePassword always returns true even if the old password doesn't match the current one
Hello,
I'm having a problem using the ChangePassword method on the MembershipHelper class.
Even when the old password the user entered doesn't match his current password the method will return true. Is this expected behaviour? Or is this is a bug in Umbraco?
Otherwise why should we pass the old password even though it let's you change the password even if it doesn't match the old one.
public ActionResult ChangePassword(WijzigWachtwoordViewModel viewModel)
{
if (ModelState.IsValid)
{
ChangingPasswordModel changingPasswordModel = new ChangingPasswordModel
{
NewPassword = viewModel.NieuwWachtwoord,
OldPassword = viewModel.HuidigWachtwoord
};
var res = Members.ChangePassword(Members.CurrentUserName, changingPasswordModel, Constants.Conventions.Member.UmbracoMemberProviderName);
if (!res.Success)
{
ModelState.AddModelError(string.Empty, "Kon WW niet wijzigen.");
return CurrentUmbracoPage();
}
return Redirect("/");
}
return CurrentUmbracoPage();
}
ChangePassword always returns true even if the old password doesn't match the current one
Hello,
I'm having a problem using the ChangePassword method on the MembershipHelper class.
Even when the old password the user entered doesn't match his current password the method will return true. Is this expected behaviour? Or is this is a bug in Umbraco?
Otherwise why should we pass the old password even though it let's you change the password even if it doesn't match the old one.
is working on a reply...