Issue
-
The requirement of mapping the below attributes in Liferay with the user profile.
-
When was the last password being set, required 'pwdLastSet' attribute
-
When was the last login date, require 'lastLogin' attribute
-
Active and deactivate users in LDAP, require 'enabled' attribute
-
Environment
- Liferay 7.2
Resolution
- When the 'LDAP' user tries to log in to Liferay, based on the mapped attributes in the LDAP server, the user's attribute value from the LDAP server will be imported to Liferay's database.
- The OOTB table 'user_' is used to add those respective entries from the LDAP server. In that table, find 'lastlogindate', 'lastloginIp', 'passwordModifiedDate' columns, from which, this requirement can be achieved.
-
However, to check for active and deactivate users, there is one workaround here to see if it can help in this matter to proceed further with the required customization
- Please check the active user details in LDAP and then in Liferay DB in OOTB table user_, also check with the one column called 'ldapServerId' which stores the value of the respective LDAP server's ID of the user.
- Now, kindly deactivate the user in LDAP and check for the same user entry in the table user_, this might give a clear picture of how someone can proceed with this requirement.
Additional Information
- As there is no OOTB in Liferay to achieve this business-specific requirement but someone may try the suggested columns and workaround if it works for them in their customization.
- Also, for further assistance on the same, Global Services Team can be approached as giving development ideas & business-specific requirements come within the scope of the Global Services team.