diff --git a/src/includes/class/class.LSldapObject.php b/src/includes/class/class.LSldapObject.php index 8ad88246..78995efe 100644 --- a/src/includes/class/class.LSldapObject.php +++ b/src/includes/class/class.LSldapObject.php @@ -507,8 +507,15 @@ class LSldapObject extends LSlog_staticLoggerClass { if (!$this -> validateAttrData($LSform, $attr, $justCheck)) { $retval = false; } + // Attribute not empty, remove it from force generated attributes list (if present) + if ( + !empty($attr_values + && ($key = array_search($attr_name, $forceGeneration)) !== false) + ) { + unset($forceGeneration[$key]); + } } - else if( + if( in_array($attr_name, $forceGeneration) || (empty($attr_values) && $attr -> isRequired()) ) {