diff --git a/docs/20_Usage.md b/docs/20_Usage.md index 6f6c14f70aa820fb7bc5a65d0c0576592ae12a80..3713ad6ae24a2864d287d9baa6b8624cb0e1b7a4 100644 --- a/docs/20_Usage.md +++ b/docs/20_Usage.md @@ -87,6 +87,14 @@ $aUser = $oLdap->getUserInfo("john@example.com", ["memberof", "uid"]); print_r($oLdap->normalizeSearchentry($aUser)); ``` +### Verify user and password for login + +```php +// set values from $_FORM or $_POST data of your login form here +// The variable $bAuthenticated is true if authentication of the user was successful. +$bAuthenticated=oLdap->verifyPassword($sUser, $sPassword); +``` + ### Example: search When using special chars in search then you can sanitize the search string.