index d1f47b457c6b9b33492561ea79a0fe81de9b7d09..6aa0277886795d0f9b4199f8287000500a6e4527 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
$this->currentLocation= $name;
/* Add location elements */
$this->currentLocation= $name;
/* Add location elements */
- $this->data['LOCATIONS'][$name]= $attrs;
- }
+ $this->data['LOCATIONS'][$name]= $attrs;
+ }
break;
/* Handle referral tags */
break;
/* Handle referral tags */
/* Get asterisk servers */
$ldap->cd ($this->current['BASE']);
/* Get asterisk servers */
$ldap->cd ($this->current['BASE']);
- $ldap->search ("(objectClass=goGlpiServer)");
+ $ldap->search ("(&(objectClass=goGlpiServer)(cn=*)(goGlpiAdmin=*)(goGlpiDatabase=*))",array("cn","goGlpiPassword","goGlpiAdmin","goGlpiDatabase"));
if ($ldap->count()){
$attrs= $ldap->fetch();
if ($ldap->count()){
$attrs= $ldap->fetch();
+ if(!isset($attrs['goGlpiPassword'])){
+ $attrs['goGlpiPassword'][0] ="";
+ }
$this->data['SERVERS']['GLPI']= array(
'SERVER' => $attrs['cn'][0],
'LOGIN' => $attrs['goGlpiAdmin'][0],
$this->data['SERVERS']['GLPI']= array(
'SERVER' => $attrs['cn'][0],
'LOGIN' => $attrs['goGlpiAdmin'][0],