Yes, yet another question regarding this subject... But even if there is some information on salesforce forums, I think some of that is outdated (since the Portals became Communities and there were some changes in the few last releases). Maybe someone experienced with Communities in their present state (May 2015) could provide an answer that would be valid for Summer'15 release?
But let's go to the point, let me explain the details:
Now, the external app needs to create a Community user. It uses the email form for the username (eg. "[email protected]"). Under the hood, we are appending the suffix consisting of constant string denoting our community name and InstanceName (eg. EU1) from Organization object. The real SFDC Community username then becomes eg. "[email protected]".
I think that it is enough for providing the uniqueness on production. But what if we have 5 sandboxes, and all of them will land on the same instance, eg. CS15? Will our application be able to create the Community user with name [email protected] on each of the sandboxes?
And what if the other company that uses salesforce will create their community also named "ACME" and this will also land on the EU1 instance? If John Doe would also like to create user with the same name "[email protected]" (let's say this time typed in manually)? Will there be a username conflict (duplicated usernames)?