Legacy Knowledge Base
Publicado Jul. 25, 0002

Mapping of 'LDAP' attributes in Liferay

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

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.
Did this article resolve your issue ?

Legacy Knowledge Base