Visual Guard Class Library Documentation

VGSecurityRuntime.ResetPassword Method (String, Boolean)

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

public string ResetPassword(
   String name,
   Boolean ignoreRequiresQuestionAndAnswer
);

Parameters

name
The name of the user to reset the password for.
ignoreRequiresQuestionAndAnswer
When the value is true ignore the option RequiresQuestionAndAnswer and reset the password.

Return Value

The new password for the specified user.

Exceptions

Exception Type Condition
ArgumentNullException

The name is null.

ArgumentException

The name is longer than 64 characters

or

The name is empty.

VGMembershipPasswordException The user account is currently locked out or does not exist.

- or -

The generated password does not pass the password policy validation.
NotSupportedException

RequiresQuestionAndAnswer is set to true and ignoreRequiresQuestionAndAnswer is set to false.

or

EnablePasswordReset is not set to true.

or

the repository does not support Visual Guard authentication mode.

See Also

VGSecurityRuntime Class | Novalys.VisualGuard.Security Namespace | VGSecurityRuntime.ResetPassword Overload List