legacy-knowledge-base
Publicado Jul. 25, 2002

Importing LDAP users with the same email address

written-by

Katlyn Lee

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

learn-legacy-article-disclaimer-text

Issue

  • I want to import LDAP users that have the same email address, but the import fails due to an error about a duplicate email address:
    2021-08-02 16:53:47.766 ERROR [https-jsse-nio-4443-exec-13][LDAPAuth:432] 
    Problem accessing LDAP server

    com.liferay.portal.kernel.exception.UserEmailAddressException$MustNotBeDuplicate

Environment

  • Liferay DXP

Resolution

  • This behavior is intended, and Liferay does not support users having duplicate email addresses. To workaround this behavior, you can modify the settings to have users authenticate by screenname and leverage the following portal properties to make email addresses optional:
            
        #
        # Set this to false if you want to be able to create users without an email
        # address. An email address will be automatically assigned to a user based
        # on the property "users.email.address.auto.suffix".
        #
        users.email.address.required=true
    
        #
        # Set the suffix of the email address that will be automatically generated
        # for a user that does not have an email address. This property is not used
        # unless the property "users.email.address.required" is set to false. The
        # autogenerated email address will be the user ID plus the specified suffix.
        #
        users.email.address.auto.suffix=@no-emailaddress.com
            
did-this-article-resolve-your-issue

legacy-knowledge-base