MembershipProvider.ValidateUser(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Verifies that the specified user name and password exist in the data source.
public:
abstract bool ValidateUser(System::String ^ username, System::String ^ password);
public abstract bool ValidateUser (string username, string password);
abstract member ValidateUser : string * string -> bool
Public MustOverride Function ValidateUser (username As String, password As String) As Boolean
Parameters
- username
- String
The name of the user to validate.
- password
- String
The password for the specified user.
Returns
true
if the specified username and password are valid; otherwise, false
.
Examples
For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
Remarks
Takes, as input, a user name and a password and verifies that the values match those in the data source. ValidateUser returns true
for a successful user name and password match; otherwise, false
.
For successful validations, ValidateUser updates the LastLoginDate for the specified user.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för