Breyta

Deila með


MembershipProvider.ValidateUser(String, String) Method

Definition

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