Fix: on ne pouvait pas récupérer d'attribut supplémentaire
This commit is contained in:
parent
338853771c
commit
37d3847e41
@ -426,7 +426,7 @@ class Auth_Container_LDAP extends Auth_Container
|
|||||||
$attributes['count'] > 0)
|
$attributes['count'] > 0)
|
||||||
{
|
{
|
||||||
$this->_debug('Saving attributes to Auth data', __LINE__);
|
$this->_debug('Saving attributes to Auth data', __LINE__);
|
||||||
$this->_auth_obj->setAuthData('attributes', $attributes);
|
DOLIAUTH::setAuthData('attributes', $attributes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ldap_free_result($result_id);
|
@ldap_free_result($result_id);
|
||||||
|
|||||||
@ -311,8 +311,8 @@ if (! session_id() || ! isset($_SESSION["dol_login"]))
|
|||||||
'basedn' => $ldapdn,
|
'basedn' => $ldapdn,
|
||||||
'binddn' => $ldapadminlogin,
|
'binddn' => $ldapadminlogin,
|
||||||
'bindpw' => $ldapadminpass,
|
'bindpw' => $ldapadminpass,
|
||||||
|
'debug' => $ldapdebug,
|
||||||
'debug' => $ldapdebug,
|
//'attributes' => array('pwdlastset'),
|
||||||
'userfilter' => ''
|
'userfilter' => ''
|
||||||
);
|
);
|
||||||
if ($ldapdebug) print "DEBUG: params=".join(',',$params)."<br>\n";
|
if ($ldapdebug) print "DEBUG: params=".join(',',$params)."<br>\n";
|
||||||
@ -323,16 +323,16 @@ if (! session_id() || ! isset($_SESSION["dol_login"]))
|
|||||||
$result = $aDol->getAuth(); // Si deja logue avec succes, renvoie vrai, sinon effectue un redirect sur page loginfunction et renvoie false
|
$result = $aDol->getAuth(); // Si deja logue avec succes, renvoie vrai, sinon effectue un redirect sur page loginfunction et renvoie false
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
// Authentification Auth OK, on va chercher le login
|
// Authentification Auth OK, on va chercher le login
|
||||||
$login=$aDol->getUsername();
|
$login=$aDol->getUsername();
|
||||||
dolibarr_syslog ("Authentification ok (en mode Pear Base LDAP)");
|
dolibarr_syslog ("Authentification ok (en mode Pear Base LDAP)");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (isset($_POST["loginfunction"]))
|
if (isset($_POST["loginfunction"]))
|
||||||
{
|
{
|
||||||
// Echec authentification
|
// Echec authentification
|
||||||
dolibarr_syslog("Authentification ko (en mode Pear Base LDAP) pour '".$_POST["username"]."'");
|
dolibarr_syslog("Authentification ko (en mode Pear Base LDAP) pour '".$_POST["username"]."'");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user