This method checks the username and password against the directory information and returns TRUE if they are valid. It returns FALSE if they are incorrect.
IDL Definition
HRESULT VerifyPassword(
BSTR bszUserName,
BSTR bszPassword,
[out, retval] LONG* plPasswordVerified
);
Parameters
bszUserName
The username
bszPassword
The password
plPasswordVerified
On return, the LONG variable holds the result of the verification. The value returned will be either TRUE (1) or FALSE (0). TRUE means that the password was correct.
Return Values
a standard HRESULT value
Example
ASP and VBScript
<% Set IVerifUsr = Server.CreateObject("Membership.VerifUsr")
' assume Username and Password are defined and need to be checked
If IVerifUsr.VerifyPassword(Username,Password) Then
Response.Write "password is correct"
Else
Response.Write "password incorrect"
End If
%>