From e2e0c0d8022026a96fd17cdc60bd040e1d6abb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20OUDOT?= Date: Tue, 19 Nov 2024 11:22:45 +0100 Subject: [PATCH 1/2] Add label for pwdLastSuccess --- lang/en.inc.php | 1 + lang/fr.inc.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lang/en.inc.php b/lang/en.inc.php index 2d67990..c6c3f91 100644 --- a/lang/en.inc.php +++ b/lang/en.inc.php @@ -80,6 +80,7 @@ $messages['label_pwdchangedtime'] = "Last password change"; $messages['label_pwdfailuretime'] = "Last authentication failures"; $messages['label_pwdgraceusetime'] = "Last grace authentications"; +$messages['label_pwdlastsuccess'] = $messages['label_authtimestamp']; $messages['label_pwdpolicysubentry'] = "Associated password policy"; $messages['label_pwdreset'] = "Reset password at next connection"; $messages['label_result'] = "Result"; diff --git a/lang/fr.inc.php b/lang/fr.inc.php index e8f272d..2df7cfa 100644 --- a/lang/fr.inc.php +++ b/lang/fr.inc.php @@ -80,6 +80,7 @@ $messages['label_pwdchangedtime'] = "Dernier changement de mot de passe"; $messages['label_pwdfailuretime'] = "Derniers échecs d'authentification"; $messages['label_pwdgraceusetime'] = "Dernières authentifications en grâce"; +$messages['label_pwdlastsuccess'] = $messages['label_authtimestamp']; $messages['label_pwdpolicysubentry'] = "Politique des mots de passe associée"; $messages['label_pwdreset'] = "Réinitialisation du mot de passe à la prochaine connexion"; $messages['label_result'] = "Résultat"; From 10498a90064aeadb49b30e1ecc0f2c3f1112dacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20OUDOT?= Date: Tue, 19 Nov 2024 11:24:26 +0100 Subject: [PATCH 2/2] Use ldap_lastauth_attribute option to display correct last auth attribute --- conf/config.inc.php | 2 +- htdocs/index.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/config.inc.php b/conf/config.inc.php index 0029fc1..4dcf4b1 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -118,7 +118,7 @@ $display_items = array('identifier', 'firstname', 'lastname', 'title', 'businesscategory', 'employeenumber', 'employeetype', 'mail', 'mailquota', 'phone', 'mobile', 'fax', 'postaladdress', 'street', 'postalcode', 'l', 'state', 'organizationalunit', 'organization', 'manager', 'secretary' ); $display_title = "fullname"; $display_show_undefined = false; -$display_password_items = array('pwdchangedtime', 'pwdfailuretime','pwdpolicysubentry', 'authtimestamp', 'pwdlastsuccess', 'pwdgraceusetime', 'starttime', 'endtime', 'created', 'modified'); +$display_password_items = array('pwdchangedtime', 'pwdfailuretime','pwdpolicysubentry', 'authtimestamp', 'pwdgraceusetime', 'starttime', 'endtime', 'created', 'modified'); $display_password_expiration_date = true; # Features diff --git a/htdocs/index.php b/htdocs/index.php index f7429a7..a3c26f1 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -75,6 +75,7 @@ # Load specific directory settings switch($ldap_type) { case "openldap": + $openldap_attributes_map['authtimestamp']['attribute'] = strtolower($ldap_lastauth_attribute); $attributes_map = array_merge($attributes_map, $openldap_attributes_map); $directory = new \Ltb\Directory\OpenLDAP(); break;