FIX getObjectSid is only for Active Directory
This commit is contained in:
parent
64c53e2e85
commit
ffe866f96f
@ -164,9 +164,13 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
|
|||||||
if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset,'day')."<br>\n";
|
if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset,'day')."<br>\n";
|
||||||
if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime,'day')."<br>\n";
|
if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime,'day')."<br>\n";
|
||||||
|
|
||||||
// On recherche le user dolibarr en fonction de son SID ldap
|
// On recherche le user dolibarr en fonction de son SID ldap (only for Active Directory)
|
||||||
|
$sid = null;
|
||||||
|
if ($conf->global->LDAP_SERVER_TYPE == "activedirectory")
|
||||||
|
{
|
||||||
$sid = $ldap->getObjectSid($login);
|
$sid = $ldap->getObjectSid($login);
|
||||||
if ($ldapdebug) print "DEBUG: sid = ".$sid."<br>\n";
|
if ($ldapdebug) print "DEBUG: sid = ".$sid."<br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
$usertmp=new User($db);
|
$usertmp=new User($db);
|
||||||
$resultFetchUser=$usertmp->fetch('',$login,$sid);
|
$resultFetchUser=$usertmp->fetch('',$login,$sid);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user