Fix: traduction plus explicite

This commit is contained in:
Regis Houssin 2008-01-05 08:45:50 +00:00
parent 27ca54479e
commit 5934460aa1
4 changed files with 10 additions and 3 deletions

View File

@ -118,7 +118,7 @@ function check_user_password_ldap($usertotest,$passwordtotest)
$ldap->close(); $ldap->close();
sleep(1); sleep(1);
$langs->load('ldap'); $langs->load('ldap');
$_SESSION["dol_loginmesg"]=$langs->trans("UserMustChangePassNextLogon"); $_SESSION["dol_loginmesg"]=$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN);
return $login; return $login;
} }
else else

View File

@ -1,6 +1,6 @@
# Dolibarr language file - en_US - ldap # Dolibarr language file - en_US - ldap
DomainPassword=Password for domain DomainPassword=Password for domain
UserMustChangePassNextLogon=User must change its password at next connection UserMustChangePassNextLogon=You must change your password on the domain %s
LdapUacf_NORMAL_ACCOUNT=User account LdapUacf_NORMAL_ACCOUNT=User account
LdapUacf_DONT_EXPIRE_PASSWORD=Password never expires LdapUacf_DONT_EXPIRE_PASSWORD=Password never expires
LdapUacf_ACCOUNTDISABLE=Account is disabled on this domain LdapUacf_ACCOUNTDISABLE=Account is disabled on this domain

View File

@ -1,6 +1,6 @@
# Dolibarr language file - fr_FR - ldap # Dolibarr language file - fr_FR - ldap
DomainPassword=Mot de passe du domaine DomainPassword=Mot de passe du domaine
UserMustChangePassNextLogon=L'utilisateur doit changer de mot de passe à la prochaine connexion UserMustChangePassNextLogon=Vous devez modifier votre 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 LdapUacf_ACCOUNTDISABLE=Le compte est désactivé sur le domaine

View File

@ -436,6 +436,7 @@ class Ldap
** "uid=username, ou=People, dc=orgname,dc=com" ** "uid=username, ou=People, dc=orgname,dc=com"
*/ */
if ($this->serverType == "activedirectory") { if ($this->serverType == "activedirectory") {
// FQDN domain
$domain = eregi_replace('dc=','',$this->domain); $domain = eregi_replace('dc=','',$this->domain);
$domain = eregi_replace(',','.',$domain); $domain = eregi_replace(',','.',$domain);
$checkDn = "$uname@$domain"; $checkDn = "$uname@$domain";
@ -918,8 +919,14 @@ class Ldap
$this->uacf = $this->parseUACF($this->ldap_utf8_decode($result[0]["useraccountcontrol"][0])); $this->uacf = $this->parseUACF($this->ldap_utf8_decode($result[0]["useraccountcontrol"][0]));
$this->pwdlastset = ($result[0]["pwdlastset"][0] != 0)?$this->convert_time($this->ldap_utf8_decode($result[0]["pwdlastset"][0])):0; $this->pwdlastset = ($result[0]["pwdlastset"][0] != 0)?$this->convert_time($this->ldap_utf8_decode($result[0]["pwdlastset"][0])):0;
if (!$this->name && !$this->login) $this->pwdlastset = -1;
$this->badpwdtime = $this->convert_time($this->ldap_utf8_decode($result[0]["badpasswordtime"][0])); $this->badpwdtime = $this->convert_time($this->ldap_utf8_decode($result[0]["badpasswordtime"][0]));
// FQDN domain
$domain = eregi_replace('dc=','',$this->domain);
$domain = eregi_replace(',','.',$domain);
$this->domainFQDN = $domain;
ldap_free_result($this->result); ldap_free_result($this->result);
return 1; return 1;
} }