Visual Guard Class Library Documentation

VGSecurityManager.ResetPassword Method (String, Boolean)

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

public static 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.

or

EnablePasswordReset is not set to true.

or

the repository does not support Visual Guard authentication mode.

See Also

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