diff --git a/htdocs/lib/ldap.class.php b/htdocs/lib/ldap.class.php
index 4d3b82e208e..ff507e155de 100644
--- a/htdocs/lib/ldap.class.php
+++ b/htdocs/lib/ldap.class.php
@@ -458,6 +458,7 @@ class Ldap
*/
$this->ldapErrorCode = ldap_errno( $this->connection);
$this->ldapErrorText = ldap_error( $this->connection);
+ $this->ldapDebugDomain = $domain;
return false;
}
}
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 8154effbb26..c79b0077465 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -320,6 +320,7 @@ if (! isset($_SESSION["dol_login"]))
$resultCheck=$ldap->checkPass($usertotest,$passwordtotest);
print $ldap->ldapErrorCode.'
';
print $ldap->ldapErrorText.'
';
+ print 'domain:'.$ldap->ldapDebugDomain.'
';
print 'result:'.$resultCheck.'
';
if ($resultCheck)
{