Skip to content

Commit

Permalink
fix account locking name and bug (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Oct 16, 2024
1 parent 9723e47 commit b2b8a9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
24 changes: 0 additions & 24 deletions htdocs/display.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
$isAccountEnabled = $directory->isAccountEnabled($ldap, $dn);
}

$isLocked = false;
$unlockDate = "";
$isExpired = false;
$ppolicy_entry = "";
Expand All @@ -145,29 +144,6 @@
{
$pwdLockoutDuration = $ppolicy_entry[0]['pwdlockoutduration'][0];
}
if(isset($entry[0]['pwdaccountlockedtime'][0]))
{
$pwdAccountLockedTime = $entry[0]['pwdaccountlockedtime'][0];
}
else
{
$pwdAccountLockedTime = null;
}

if ( $pwdAccountLockedTime === "000001010000Z" ) {
$isLocked = true;
unset($entry[0]['pwdaccountlockedtime']);
} else if (isset($pwdAccountLockedTime)) {
if (isset($pwdLockoutDuration) and ($pwdLockoutDuration > 0)) {
$lockDate = ldapDate2phpDate($pwdAccountLockedTime);
$unlockDate = date_add( $lockDate, new DateInterval('PT'.$pwdLockoutDuration.'S'));
if ( time() <= $unlockDate->getTimestamp() ) {
$isLocked = true;
}
} else {
$isLocked = true;
}
}

# Expiration
if(isset($ppolicy_entry[0]['pwdmaxage'][0]))
Expand Down
16 changes: 8 additions & 8 deletions lang/fr.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
$messages['accountdisabled'] = "Le compte est désactivé";
$messages['auditlogs'] = "Audit";
$messages['auditlogtitle'] = "Traces d'audit pour les $audit_log_days derniers jours";
$messages['accountlocked'] = "Le compte est bloqué";
$messages['accountlocked'] = "Le compte est verrouillé";
$messages['accountnotdisabled'] = "Échec de la désactivation du compte";
$messages['accountnotenabled'] = "Échec de l'activation du compte";
$messages['accountnotlocked'] = "Échec de blocage du compte";
$messages['accountnotunlocked'] = "Échec de déblocage du compte";
$messages['accountnotlocked'] = "Échec de verrouillage du compte";
$messages['accountnotunlocked'] = "Échec de déverrouillage du compte";
$messages['accountstatus'] = "Statut du compte";
$messages['accountunlocked'] = "Le compte n'est pas bloqué";
$messages['accountunlocked'] = "Le compte n'est pas verrouillé";
$messages['actionforbidden'] = "Action interdite";
$messages['changesubject'] = "Votre mot de passe a été changé";
$messages['changesubjectforadmin'] = "Le mot de passe d'un utilisateur a été changé";
Expand Down Expand Up @@ -74,7 +74,7 @@
$messages['label_phone'] = "Téléphone";
$messages['label_postaladdress'] = "Adresse";
$messages['label_postalcode'] = "Code postal";
$messages['label_pwdaccountlockedtime'] = "Date de blocage";
$messages['label_pwdaccountlockedtime'] = "Date de verrouillage";
$messages['label_pwdchangedtime'] = "Dernier changement de mot de passe";
$messages['label_pwdfailuretime'] = "Derniers échecs d'authentification";
$messages['label_pwdpolicysubentry'] = "Politique des mots de passe associée";
Expand All @@ -86,8 +86,8 @@
$messages['label_title'] = "Titre";
$messages['label_user_dn'] = "Utilisateur";
$messages['ldaperror'] = "Erreur de communication avec l'annuaire LDAP";
$messages['lockaccount'] = "Bloquer le compte";
$messages['lockedaccounts'] = "Comptes bloqués";
$messages['lockaccount'] = "Verrouiller le compte";
$messages['lockedaccounts'] = "Comptes verrouillés";
$messages['logout'] = "Déconnexion";
$messages['newpassword'] = "Nouveau mot de passe";
$messages['noentriesfound'] = "Aucune entrée trouvée";
Expand All @@ -110,7 +110,7 @@
$messages['tooltip_emailto'] = "Envoyer un email";
$messages['tooltip_phoneto'] = "Composer ce numéro";
$messages['true'] = "Oui";
$messages['unlockaccount'] = "Débloquer le compte";
$messages['unlockaccount'] = "Déverrouiller le compte";
$messages['unlockdate'] = "Date de déblocage automatique :";
$messages['welcome'] = "Bienvenue sur le guichet de service LDAP Tool Box";
$messages['willexpireaccounts'] = "Mots de passe bientôt expirés";
Expand Down

0 comments on commit b2b8a9b

Please sign in to comment.