Updates the formHelper and streamlines the way form submission is handled, updates the member and user controller to use the new change password functionality in the Security object which uses all of the correct logic to update a password based on the membership provider. Gets the user's change password form working correctly with server validation. now just need to get the user membership provider to actually work.

This commit is contained in:
Shannon
2013-10-17 11:28:21 +11:00
parent 1ac2ccb8c2
commit d28cdf3bdc
13 changed files with 285 additions and 258 deletions

View File

@@ -1,11 +1,28 @@
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
/// <summary>
/// A model representing an attempt at changing a password
/// </summary>
public class PasswordChangedModel
{
/// <summary>
/// The error affiliated with the failing password changes, null if changing was successful
/// </summary>
public ValidationResult ChangeError { get; set; }
/// <summary>
/// If the password was reset, this is the value it has been changed to
/// </summary>
public string ResetPassword { get; set; }
}
/// <summary>
/// A model representing the data required to set a member/user password depending on the provider installed.
/// </summary>
public class ChangePasswordModel
public class ChangingPasswordModel
{
/// <summary>
/// The password value

View File

@@ -12,7 +12,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
public MemberSave()
{
Password = new ChangePasswordModel();
Password = new ChangingPasswordModel();
}
[DataMember(Name = "username", IsRequired = true)]
@@ -24,6 +24,6 @@ namespace Umbraco.Web.Models.ContentEditing
public string Email { get; set; }
[DataMember(Name = "password")]
public ChangePasswordModel Password { get; set; }
public ChangingPasswordModel Password { get; set; }
}
}