From b40754a4f342919afd531272958c959007ac4f10 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Thu, 11 Jul 2024 16:13:32 +0200 Subject: [PATCH] add example --- docs/20_Usage.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/20_Usage.md b/docs/20_Usage.md index 6f6c14f..3713ad6 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. -- GitLab