LSldap : fixed problem with empty attribute on adding

This commit is contained in:
Benjamin Renard 2013-07-11 12:33:47 +02:00
parent 673a8600f8
commit 186279bab4

View file

@ -321,7 +321,7 @@ class LSldap {
LSerror :: addErrorCode(0,'NetLdap-Error : '.$ret->getMessage()); LSerror :: addErrorCode(0,'NetLdap-Error : '.$ret->getMessage());
} }
else { else {
if (!empty($dropAttr)) { if (!empty($dropAttr) && !$new) {
foreach($dropAttr as $attr) { foreach($dropAttr as $attr) {
$value = $entry -> getValue($attr); $value = $entry -> getValue($attr);
if(Net_LDAP2::isError($value) || empty($value)) { if(Net_LDAP2::isError($value) || empty($value)) {