Details

    • Type: Technical Support
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 4.3.5
    • Fix Version/s: 5.1.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      4.3.5

      Description

      ldap.export.enabled=true

      While creating a new account and expecting that new user to be exported to an LDAP store we're experiencing a ModelListenerException that is eclipsing any further attempts at LDAP export.

      a) The code in UserLocalServiceImpl.java sets some properties on a new User object and calls UserUtil::update(User) at line 272.

      b) UserUtil does some tests for the presence of a ModelListener class, and whether the User object represents a new user, and then persists the user by calling the proper persistence object's update(User) method at line 95. Because there is a UserListener and because this is a new user, line 99 of UserUtil.java is hit, calling onAfterCreate(User) on the UserLIstener. UserListener calls the static method PortalLDAPUtil::exportToLDAP(User) at line 50. PortalLDAPUtil tries to extract properties of the User object and associated Contact object via LDAPUser.java lines 60 thru 86, and set those values as attributes in an LDAP bind attempt. Unfortunately when LDAPUser code is executed the first time through, the Contact object associated with this new user is still null, so the properties of the exported user (givenName, lastName) are invalid and the LDAP bind fails, throwing a ModelListenerException at UserListener.java line 57.

      c) Instead of this exception being caught somewhere in the vicinity of UserLocalServiceImpl.java line 273, the exception propagates beyond recoverability. I would expect

      1) UserLocalServiceImpl.java not try to update the user as it does on line 272 until the Contact object has been populated with values necessary for the export OR
      2) some kind of exception handling be put in place to ensure that after the Contact is updated, another attempt at LDAP export be attempted.

      Is this a known problem or is there a workaround for this?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              chris.morin Christopher Morin (Inactive)
              Participants of an Issue:
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  5.1.2