We setup communities in our org since few months. During the registration process we figured out that some users are unable to register because they somehow alreadyy registered with the same email address into another community. Salesforce usernames are unique accross all Salesforce orgs as you already know.
What we did so far wa to write a before trigger on the user Object which checks that if the user is a community user, it appends and extension to the user name.
The username is changed in the background but:
1. The registrant does not get a confirmation that his user has been created. He is stuck in the registration page.
2. The user is not able to login afterwards
3. The user is not able to reset his password
Is there a proper way to change the username during the registration process?
We want to keep using the "Experience Builder" Register page. Usingg the APEX and Visualforce page will propably bring new errors.
Thank you and best Regards
Karim
1 réponse
There are different requirements for username uniqueness depending on the type of license your community is using. Customer, Customer Community Plus, and Commerce Portals licenses require unique usernames within the Salesforce org that a community belongs to. Employee Community and External Apps licenses require unique usernames across all Salesforce orgs that the user belongs to.
So your customers (if they are customer community lisence) should be able to use any username - even if it is used in a differnt org - within your community so long as it doesn't already exist in your org.
https://help.salesforce.com/articleView?id=users_license_types_communities.htm&type=5