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