Resets a user's password to a new, automatically generated password.
Namespace: Novalys.VisualGuard.Security.MembershipAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2016.0.105.16 (2016.0.105.16)
Syntax
C# |
---|
public string ResetPassword() |
Visual Basic |
---|
Public Function ResetPassword As String |
Return Value
Type: StringThe new password for the membership user.
Remarks
If the property "Enable Password Reset" of the repository is not set to true a NotSupportedException will be thrown.
Exceptions
Exception | Condition |
---|---|
System..::..NotSupportedException | RequiresQuestionAndAnswer is set to true. orEnablePasswordReset is not set to true. |
System..::..NotSupportedException | the user is not a Visual Guard user and cannot be modified. |
Novalys.VisualGuard.Security.Membership..::..VGMembershipPasswordException |
The user account is currently locked out or does not exist.
- or - The generated password does not pass the password policy validation. |