diff --git a/htdocs/lib/ldap.class.php b/htdocs/lib/ldap.class.php index 2efb2d0e5e6..e56a4010b2a 100644 --- a/htdocs/lib/ldap.class.php +++ b/htdocs/lib/ldap.class.php @@ -997,7 +997,8 @@ class Ldap $this->mobile = $this->ldap_utf8_decode($result[0][$this->attr_mobile][0]); $this->uacf = $this->parseUACF($this->ldap_utf8_decode($result[0]["useraccountcontrol"][0])); - $this->pwdlastset = $this->ldap_utf8_decode($result[0]["pwdlastset"][0]); + $this->pwdlastset = $this->convert_time($this->ldap_utf8_decode($result[0]["pwdlastset"][0])); + $this->badpwdtime = $this->convert_time($this->ldap_utf8_decode($result[0]["badPasswordTime"][0])); ldap_free_result($this->result); } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8823d76df8e..9f596470e2a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -354,6 +354,9 @@ if (! session_id() || ! isset($_SESSION["dol_login"])) if ($ldapdebug) print "DEBUG: login ldap = ".$login."
\n"; $ldap->fetch($login); + if ($ldapdebug) print "DEBUG: pwdLastSet = ".dolibarr_print_date($ldap->pwdlastset,'%d %b %Y')."
\n"; + if ($ldapdebug) print "DEBUG: badPasswordTime = ".dolibarr_print_date($ldap->badpwdtime,'%d %b %Y')."
\n"; + //TODO : doit etre géré au niveau de PEAR /* // On stop si le mot de passe ldap doit etre modifié