Class ChangingPasswordModel
A model representing the data required to set a member/user password depending on the provider installed.
Inheritance
Namespace: Umbraco.Web.Models
Assembly: Umbraco.Web.dll
Syntax
public class ChangingPasswordModel
Properties
View SourceAnswer
The password answer - required for reset when: RequiresQuestionAndAnswer = true
Declaration
[DataMember(Name = "answer")]
public string Answer { get; set; }
Property Value
Type | Description |
---|---|
System.String |
GeneratedPassword
This is filled in on the server side if the password has been reset/generated
Declaration
[DataMember(Name = "generatedPassword")]
public string GeneratedPassword { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Id
The id of the user - required to allow changing password without the entire UserSave model
Declaration
[DataMember(Name = "id")]
public int Id { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
NewPassword
The password value
Declaration
[DataMember(Name = "newPassword")]
public string NewPassword { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OldPassword
The old password - used to change a password when: EnablePasswordRetrieval = false
Declaration
[DataMember(Name = "oldPassword")]
public string OldPassword { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Reset
Set to true if the password is to be reset
Declaration
[DataMember(Name = "reset")]
public bool? Reset { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Remarks
This operator is different between using ASP.NET Identity APIs and Membership APIs.
When using Membership APIs, this is only valid when: EnablePasswordReset = true and it will reset the password to something auto generated.
When using ASP.NET Identity APIs this needs to be set if an administrator user that has access to the Users section is changing another users password. This flag is required to indicate that the oldPassword value is not required and that we are in fact performing a password reset and then a password change if the executing user has access to do so.