diff --git a/public/admin/ldap-test/index.php b/public/admin/ldap-test/index.php index 322bee20..ac86608b 100644 --- a/public/admin/ldap-test/index.php +++ b/public/admin/ldap-test/index.php @@ -16,6 +16,7 @@ $serviceResult = $ldap->testServiceBind(); $messages = []; $errors = []; $form = ['username' => '', 'password' => '', 'new_password' => '']; +$attempt = null; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = (string) ($_POST['action'] ?? ''); @@ -37,6 +38,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($errors === []) { if ($action === 'test-login') { + $attempt = [ + 'action' => 'Login-Test', + 'username' => $form['username'], + ]; $result = $ldap->testUserCredentials($form['username'], $form['password']); if ($result['success'] ?? false) { @@ -45,6 +50,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $errors[] = (string) ($result['message'] ?? 'LDAP-Login fehlgeschlagen.'); } } elseif ($action === 'change-password') { + $attempt = [ + 'action' => 'Passwortänderung', + 'username' => $form['username'], + 'new_password_length' => (string) strlen($form['new_password']), + ]; $loginCheck = $ldap->testUserCredentials($form['username'], $form['password']); if (!(bool) ($loginCheck['success'] ?? false)) { @@ -121,7 +131,20 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { -