Verifies that the supplied user name and password are valid.
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 static bool ValidateUser( string username, string password ) |
Visual Basic |
---|
Public Shared Function ValidateUser ( username As String, password As String ) As Boolean |
Parameters
- username
- Type: System..::..String
The name of the user to be validated.
- password
- Type: System..::..String
The password for the specified user.
Return Value
Type: Booleantrue if the supplied user name and password are valid; otherwise, false.
Remarks
This method do not change the current user managed by Visual Guard. You must use the Authenticate(String, String, VGAuthenticationMode) method to change the current user.
This method will update the number of invalid password attempts and can lock out the user if the password is invalid.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | username or password is null. |
System..::..ArgumentException | username or password is empty or is longer than 64 characters after trimming. |