- LSsession :

-> Correction du chargement de Net_LDAP2
	-> Ajout de la possibilité d'avoir autre chose que le dn en valeur clef 
		 dans la méthode loadLSrights() (type groupe)
This commit is contained in:
Benjamin Renard 2008-12-05 14:38:42 +00:00
parent 15f678b67b
commit e9d3b321d8

View file

@ -555,15 +555,17 @@ class LSsession {
*/
function LSldapConnect() {
if ($this -> ldapServer) {
include_once($GLOBALS['LSconfig']['NetLDAP2']);
if (!$this -> loadLSclass('LSldap'))
@include_once($GLOBALS['LSconfig']['NetLDAP2']);
if (!$this -> loadLSclass('LSldap')) {
return;
$GLOBALS['LSldap'] = new LSldap($this -> ldapServer['ldap_config']);
if ($GLOBALS['LSldap'] -> isConnected())
return true;
else
return;
return $GLOBALS['LSldap'] = new LSldap($this -> ldapServer['ldap_config']);
}
$GLOBALS['LSldap'] = @new LSldap($this -> ldapServer['ldap_config']);
if ($GLOBALS['LSldap'] -> isConnected()) {
return true;
}
else {
return;
}
}
else {
$GLOBALS['LSerror'] -> addErrorCode(1003);
@ -1039,8 +1041,10 @@ class LSsession {
if ($object = new $conf['LSobject']()) {
if ($object -> loadData($dn)) {
$listDns=$object -> getValue($conf['attr']);
$valKey = (isset($conf['attr_value']))?$conf['attr_value']:'dn';
$val = $this -> LSuserObject -> getFData($valKey);
if (is_array($listDns)) {
if (in_array($this -> dn,$listDns)) {
if (in_array($val,$listDns)) {
$this -> LSrights[$profile][] = $topDn;
}
}