diff --git a/htdocs/langs/en_US/ldap.lang b/htdocs/langs/en_US/ldap.lang index fc13b344807..ba81fbd567b 100644 --- a/htdocs/langs/en_US/ldap.lang +++ b/htdocs/langs/en_US/ldap.lang @@ -4,7 +4,7 @@ YouMustChangePassNextLogon=You must change your password on the domain %s UserMustChangePassNextLogon=User must change password on the domain %s LdapUacf_NORMAL_ACCOUNT=User account LdapUacf_DONT_EXPIRE_PASSWORD=Password never expires -LdapUacf_ACCOUNTDISABLE=Account is disabled on this domain +LdapUacf_ACCOUNTDISABLE=Account is disabled in the domain %s LDAPInformationsForThisContact=Information in LDAP database for this contact LDAPInformationsForThisUser=Information in LDAP database for this user LDAPInformationsForThisGroup=Information in LDAP database for this group diff --git a/htdocs/langs/fr_FR/ldap.lang b/htdocs/langs/fr_FR/ldap.lang index b1a904f1c7b..ed15ee4645b 100644 --- a/htdocs/langs/fr_FR/ldap.lang +++ b/htdocs/langs/fr_FR/ldap.lang @@ -4,7 +4,7 @@ YouMustChangePassNextLogon=Vous devez modifier votre mot de passe sur le domaine UserMustChangePassNextLogon=L'utilisateur doit modifier son mot de passe sur le domaine %s LdapUacf_NORMAL_ACCOUNT=Compte Utilisateur LdapUacf_DONT_EXPIRE_PASSWORD=Le mot de passe n'expire jamais -LdapUacf_ACCOUNTDISABLE=Le compte est désactivé sur le domaine +LdapUacf_ACCOUNTDISABLE=Le compte est désactivé sur le domaine %s LDAPInformationsForThisContact=Informations en base LDAP pour ce contact LDAPInformationsForThisUser=Informations en base LDAP pour cet utilisateur LDAPInformationsForThisGroup=Informations en base LDAP pour ce groupe diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 202cf1c505d..18742aabdc6 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -718,15 +718,24 @@ else $passDoNotExpire = 0; $userChangePassNextLogon = 0; + $userDisabled = 0; //On verifie les options du compte - foreach ($ldap->uacf as $key => $statut) + if (sizeof($ldap->uacf) > 0) { - if ($key == 65536) + foreach ($ldap->uacf as $key => $statut) { - $passDoNotExpire = 1; + if ($key == 65536) + { + $passDoNotExpire = 1; + } } } + else + { + $userDisabled = 1; + } + if ($ldap->pwdlastset == 0) { $userChangePassNextLogon = 1; @@ -848,6 +857,10 @@ else { print ''.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).''; } + else if($userDisabled) + { + print ''.$langs->trans("LdapUacf_ACCOUNTDISABLE",$ldap->domainFQDN).''; + } else { print ''.$langs->trans("DomainPassword").'';