LSldap :: getEntry() : Fixed to don't set dafault_value of attributes

This commit is contained in:
Benjamin Renard 2010-03-16 17:46:10 +01:00
parent 890670eaf4
commit 1b8bf7b250

View file

@ -188,14 +188,7 @@ class LSldap {
if(is_array($obj_conf)){ if(is_array($obj_conf)){
$entry = self :: getLdapEntry($dn); $entry = self :: getLdapEntry($dn);
if ($entry === false) { if ($entry === false) {
$attributes = array(); $newentry = self :: getNewEntry($dn,$obj_conf['objectclass'],array());
foreach($obj_conf['attrs'] as $attr_name => $attr_conf) {
if( isset($attr_conf['default_value']) ) {
$attributes[$attr_name]=$attr_conf['default_value'];
}
}
$newentry = self :: getNewEntry($dn,$obj_conf['objectclass'],$attributes);
if (!$newentry) { if (!$newentry) {
return; return;