LSldap::update(): fix object creation with required userPassword attribute

This commit is contained in:
Benjamin Renard 2022-06-23 10:17:44 +02:00
parent 1aa4dd8113
commit c0d8f9f81a

View file

@ -475,7 +475,7 @@ class LSldap extends LSlog_staticLoggerClass {
$error = false;
// Handle special case: user password change
if ($changed_attrs && self :: attrExists($changed_attrs, 'userPassword')) {
if ($changed_attrs && !$entry->isNew() && self :: attrExists($changed_attrs, 'userPassword')) {
$changed_attrs = self :: updateUserPassword($object_type, $changed_attrs, $dn);
if ($changed_attrs === false) {
return false;