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

LDAP import process always overwrite email attribute even email mapping is not configured

    Details

      Description

      LDAP import process always overwrite email attribute even "email" mapping is not configured and it is configured as optional at Liferay.

      If we configure to autogenerate the email address at liferay, it will be overwrite with blank mail from LDAP even mapping is not configured.

      Steps to reproduce

      1. Configure portal-ext.properties with following keys:
        company.security.auth.type=screenName
        users.email.address.required=false
        [email protected]
        

        Optionally, you can change LDAP execution interval (in minutes) adding

        ldap.import.interval=10
        
      2. Create a user at LDAP called "lps51248" with first_name "lps51248_test1".
        1. At ApacheDS you can use following LDIF file:
          dn: cn=lps51248,dc=liferay,dc=com
          objectclass: inetOrgPerson
          objectclass: organizationalPerson
          objectclass: person
          objectclass: top
          cn: lps51248
          sn: lps51248
          givenName: lps51248_test1
          
      3. Import LDAP users into Liferay
        1. Wait until LDAP import process is executed
        2. The user will be imported from LDAP by Liferay
        3. Execute SQL:
          select userid,screenname,emailaddress from user_ where screenname = 'lps51248'
          
        4. The emailaddress field will have an autogenerated value: <userid>@no-emailaddress.com
      4. Open Control Panel => Users
        1. Open Control Panel => Users => Edit "lps51248" user
        2. Email field is blank (because it is a autogenerated mail)
        3. Fill email with [email protected] and Save the user modification
        4. Execute SQL:
          select userid,screenname,emailaddress from user_ where screenname = 'lps51248'
          
        5. The emailaddress field will have the specified value: [email protected]
      5. At LDAP, edit "lps51248" user, change the first_name (givenName field) from lps51248_test1 to lps51248_test2
        1. Wait until LDAP import process is executed
        2. The user will be updated from LDAP with new data
        3. Execute SQL:
          select userid,screenname,emailaddress from user_ where screenname = 'lps51248'
          
        4. Detected behaviour
        • The screenname field will be updated from lps51248_test1 to lps51248_test2
        • The emailaddress field will have an autogenerated value: <userid>@no-emailaddress.com
        1. Expected behaviour
        • The screenname field will be updated from lps51248_test1 to lps51248_test2
        • The emailaddress is not updated by LDAP import process and remains with the specified value: [email protected]

        Attachments

        1. fix.jpg
          fix.jpg
          90 kB
        2. reproduce.jpg
          reproduce.jpg
          96 kB

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 39 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.3 CE GA4
                  6.2.X EE
                  7.0.0 M3