Resets a user's password to a new, automatically generated password.

Namespace: Novalys.VisualGuard.Security.Membership
Assembly: 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: String
The 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

ExceptionCondition
System..::..NotSupportedException

RequiresQuestionAndAnswer is set to true.

or

EnablePasswordReset is not set to true.

System..::..NotSupportedExceptionthe 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.

See Also