Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-25484

Don`t work ldap.user.ignore.attributes for firstName, middleName, lastName

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed

      Description

      1. in portal-ext.properties set ldap.user.ignore.attributes=lastName,middleName,birthday,aimSn,comments,facebookId,facebookSn,greeting,icqSn,jabberSn,jobTitle,languageId,msnSn,mySpaceSn,openId,prefixId,reminderQueryAnswer,reminderQueryQuestion,skypeSn,smsSn,suffixId,timeZoneId,twitterSn,ymSn
      2. Login with User
      3. Change middleName and lastName and Save
      4. logout
      5. Login with User
      6. middleName and lastName changed from LDAP.

      Errors in com\liferay\portal\security\ldap\LDAPUser.java:
      get from _user.
      public String getFirstName()

      { return _user.getFirstName(); }

      public String getLastName()

      { return _user.getLastName(); }

      public String getMiddleName()

      { return _user.getMiddleName(); }

      BUT set to _contact
      public void setFirstName(String firstName)

      { _contact.setFirstName(firstName); }

      public void setMiddleName(String middleName)

      { _contact.setMiddleName(middleName); }

      public void setLastName(String lastName)

      { _contact.setLastName(lastName); }

      and here PortalLDAPImporterImpl.java don`t work:

      for (String attribute : ldapIgnoreAttributes) {
      Object value = BeanPropertiesUtil.getObjectSilent(user, attribute);

      if (value == null)

      { value = BeanPropertiesUtil.getObjectSilent(contact, attribute); }

      if (value != null)

      { BeanPropertiesUtil.setProperty(ldapUser, attribute, value); }

      }

      user = UserLocalServiceUtil.updateUser(
      user.getUserId(), password, StringPool.BLANK, StringPool.BLANK,
      passwordReset, ldapUser.getReminderQueryQuestion(),
      ldapUser.getReminderQueryAnswer(), ldapUser.getScreenName(),
      ldapUser.getEmailAddress(), ldapUser.getFacebookId(),
      ldapUser.getOpenId(), ldapUser.getLanguageId(),
      ldapUser.getTimeZoneId(), ldapUser.getGreeting(),
      ldapUser.getComments(), ldapUser.getFirstName(),
      ldapUser.getMiddleName(), ldapUser.getLastName(),
      ldapUser.getPrefixId(), ldapUser.getSuffixId(), ldapUser.isMale(),
      birthdayMonth, birthdayDay, birthdayYear, ldapUser.getSmsSn(),
      ldapUser.getAimSn(), ldapUser.getFacebookSn(), ldapUser.getIcqSn(),
      ldapUser.getJabberSn(), ldapUser.getMsnSn(),
      ldapUser.getMySpaceSn(), ldapUser.getSkypeSn(),
      ldapUser.getTwitterSn(), ldapUser.getYmSn(), ldapUser.getJobTitle(),
      ldapUser.getGroupIds(), ldapUser.getOrganizationIds(),
      ldapUser.getRoleIds(), ldapUser.getUserGroupRoles(),
      ldapUser.getUserGroupIds(), ldapUser.getServiceContext());

      sorry for my english

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              luyang.tan Luyang Tan (Inactive)
              Reporter:
              sat2 Ramil Husnulin (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 21 weeks, 2 days ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2