Resets a user's password to a new, automatically generated password.
Namespace:
Novalys.VisualGuard.SecurityAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
C# |
---|
public static string ResetPassword( string name ) |
Visual Basic (Declaration) |
---|
Public Shared Function ResetPassword ( _ name As String _ ) As String |
Parameters
- name
- Type: System..::.String
The name of the user to reset the password for.
Return Value
The new password for the specified user.Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException |
The name is null. |
System..::.ArgumentException |
The name is longer than 64 characters orThe name is empty. |
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. |
System..::.NotSupportedException |
RequiresQuestionAndAnswer is not set to true. orEnablePasswordReset is not set to true. orthe repository does not support Visual Guard authentication mode. |