Fix: on averti si le user est désactivé sur le domain ldap

This commit is contained in:
Regis Houssin 2008-01-05 10:53:07 +00:00
parent 80e86a4bf1
commit 5af458c45f
2 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@
DomainPassword=Mot de passe du domaine DomainPassword=Mot de passe du domaine
YouMustChangePassNextLogon=Vous devez modifier votre mot de passe sur le domaine %s YouMustChangePassNextLogon=Vous devez modifier votre mot de passe sur le domaine %s
UserMustChangePassNextLogon=L'utilisateur doit modifier son mot de passe sur le domaine %s UserMustChangePassNextLogon=L'utilisateur doit modifier son mot de passe sur le domaine %s
LdapUacf_NORMAL_ACCOUNT=Compte Utilisateur LdapUacf_NORMAL_ACCOUNT=Compte utilisateur
LdapUacf_DONT_EXPIRE_PASSWORD=Le mot de passe n'expire jamais LdapUacf_DONT_EXPIRE_PASSWORD=Le mot de passe n'expire jamais
LdapUacf_ACCOUNTDISABLE=Le compte est désactivé sur le domaine %s LdapUacf_ACCOUNTDISABLE=Le compte est désactivé sur le domaine %s
LDAPInformationsForThisContact=Informations en base LDAP pour ce contact LDAPInformationsForThisContact=Informations en base LDAP pour ce contact

View File

@ -719,21 +719,24 @@ else
$passDoNotExpire = 0; $passDoNotExpire = 0;
$userChangePassNextLogon = 0; $userChangePassNextLogon = 0;
$userDisabled = 0; $userDisabled = 0;
$statutUACF = '';
//On verifie les options du compte //On verifie les options du compte
if (sizeof($ldap->uacf > 0) if (sizeof($ldap->uacf) > 0)
{ {
foreach ($ldap->uacf as $key => $statut) foreach ($ldap->uacf as $key => $statut)
{ {
if ($key == 65536) if ($key == 65536)
{ {
$passDoNotExpire = 1; $passDoNotExpire = 1;
$statutUACF = $statut;
} }
} }
} }
else else
{ {
$userDisabled = 1; $userDisabled = 1;
$statutUACF = "ACCOUNTDISABLE";
} }
if ($ldap->pwdlastset == 0) if ($ldap->pwdlastset == 0)
@ -851,7 +854,7 @@ else
{ {
if ($passDoNotExpire) if ($passDoNotExpire)
{ {
print '<td>'.$langs->trans("LdapUacf_".$statut).'</td>'; print '<td>'.$langs->trans("LdapUacf_".$statutUACF).'</td>';
} }
else if($userChangePassNextLogon) else if($userChangePassNextLogon)
{ {
@ -859,7 +862,7 @@ else
} }
else if($userDisabled) else if($userDisabled)
{ {
print '<td class="warning">'.$langs->trans("LdapUacf_ACCOUNTDISABLE",$ldap->domainFQDN).'</td>'; print '<td class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</td>';
} }
else else
{ {