From c0d8f9f81af17a85d837389a64a4b7305e04de1d Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 23 Jun 2022 10:17:44 +0200 Subject: [PATCH] LSldap::update(): fix object creation with required userPassword attribute --- src/includes/class/class.LSldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/class/class.LSldap.php b/src/includes/class/class.LSldap.php index ffaed5f7..cd14125b 100644 --- a/src/includes/class/class.LSldap.php +++ b/src/includes/class/class.LSldap.php @@ -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;