- π©πͺGermany gngn
I encountered similar behaviour: LDAP is not updated after changing the password.
I logged out and logged in again (only possible with the new password).
After that LDAP was synced.So I think the password change was only stored in the drupal database at first.
The re-login somehow triggered the LDAP sync. - π©πͺGermany websiedler
I can confirm similar behaviour changing the password using the user profile form.
digging in the code I recognized that CredentialsStorage::storeUserPassword) is called twice, first as expected by ldap_user_grab_password_validate() with the new password from the profile form, but after that by LdapProtectedUserFieldConstraintValidator:validate() with the old password from the current useraccount.
Therefore CredentialsStorage::getPassword() in LdapEntryProvisionSubscriber::fetchDrupalAccountPassword() gets the old password and syncs it subsequently.
The new password is correctly set in the local Drupal database by the profile form.
After a successful re-login with the new password, it is grabbed and synced as expected.
- πΊπΈUnited States bluegeek9
@websiedler,
Thank you for reporting this. Now that I know what to look for, we can fix this.
- Assigned to bluegeek9
- πΊπΈUnited States bluegeek9
I was able to verify that CredentialsStorage::storeUserPassword is called twice. LdapEntryProvisionSubscriber::fetchDrupalAccountPassword is called after ldap_user_grab_password_validate.
I was able to confirm removing the second call from LdapEntryProvisionSubscriber::fetchDrupalAccountPassword works.
I intended to also add test coverage to the ldap_user module.
-
bluegeek9 β
committed 2f2f74b5 on 8.x-4.x
Issue #3274935 by bluegeek9: LDAP is not updated when user set his...
-
bluegeek9 β
committed 2f2f74b5 on 8.x-4.x
- Issue was unassigned.
- Status changed to Fixed
8 months ago 9:33pm 23 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.