Bonjour à tous, Dans un LDAP l'attribut mail peut contenir plusieurs valeurs, il serait donc bon de toutes les récupérer si c'est le cas.
Voici un patch qui fait le travail : Index: inc/user.class.php =================================================================== --- inc/user.class.php (revision 19541) +++ inc/user.class.php (working copy) @@ -1179,10 +1179,13 @@ case "email2": case "email3": case "email4": - if (!empty($v[0][$e][0])) { - $this->fields["_emails"][] = addslashes($v[0][$e][0]); - } - break; + if (!empty($v[0][$e])) { + foreach ($v[0][$e] as $km => $m) { + if(!preg_match('/count/',$km)) { + $this->fields["_emails"][] = addslashes($m); + } + } + } case "language" : $language = Config::getLanguage($v[0][$e][0]); if ($language != '') { @@ -1470,7 +1473,7 @@ if ($ID != Session::getLoginUserID() && !Session::haveRight("user", "r")) { return false; } - + if ($ID > 0) { $this->check($ID,'r'); $caneditpassword = $this->currentUserHaveMoreRightThan($ID); Adadov _______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev