Details
-
Bug
-
Status: Closed
-
Resolution: No Longer Reproducible
-
7.0.2 CE GA3, 7.0.0 DXP FP10, 7.0.0 DXP FP12, 7.0.0 DXP FP27, 7.0.X EE, Master
-
3
Description
The LDAP importer update the user even though the LDAP record doesn't change.
To replicate the issue:
1) Setup LDAPAuth and LDAPImport
2) Set logs to DEBUG level for the class: com.liferay.portal.security.ldap.internal.exportimport.LDAPUserImporterImpl
3) Sign in
4) Sign out
5) Sign in again with the same user
Expected result: the user won't be updated and I should get this message: "User <EMAIL_ADDRESS> is already synchronized, but updated password to avoid a blank value"
Actual result: The user will be updated
This issue is due to LDAP modifiedDate check
https://github.com/liferay/liferay-portal/blob/master/modules/apps/foundation/portal-security/portal-security-ldap/src/main/java/com/liferay/portal/security/ldap/internal/exportimport/LDAPUserImporterImpl.java#L1514
It will always fail because the User modifiedDate is continously updated due this: https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/service/persistence/impl/UserPersistenceImpl.java#L7830