cancel
Showing results for 
Search instead for 
Did you mean: 

control of username when inviting external users

gsvitak
Champ in-the-making
Champ in-the-making
Hello,

I have Share 3 stable installed and working properly. Great job on finishing off the release. Smiley Very Happy

I have one question that I have not found an answer for by searching the forums. I created a site in share and then wanted to add external users to the site. The email was delivered without a problem but the username is completely randomly generated. I was expecting more first initial of the name and full last name.

Is there a way to modify this behavior so that I can choose which values will be used to create the username via configuration?

Thanks,
G
7 REPLIES 7

ocranm
Champ in-the-making
Champ in-the-making
Hi,

Have you found a solution to this problem? I would also like to alter this.

You help would be much appreciated.

gsvitak
Champ in-the-making
Champ in-the-making
not yet.. not even sure where to begin to look

mrogers
Star Contributor
Star Contributor
There is currently no way to control the generation of the new user id, however it would be a fairly easy enhancement.

There is a random user id generator in the invite service which is used to generate random user ids.

I've recently refactored the invite service on HEAD but I've not touched this particular behaviour, the class concerned is InvitationServiceImpl if someone wants to attempt a contribution.

urshah
Champ in-the-making
Champ in-the-making
I ran across the same thing and found i have to create the username in the web client first then send an invite in Share.
Not an ideal solution, but it works for now.

mrogers
Star Contributor
Star Contributor
ALFCOM-2018 has now been implemented.   Thanks to Ed Lyons for his contibution.

paxdominus
Champ in-the-making
Champ in-the-making
I think it's cool the ALFCOM-2018 has been implemented, but as a user, how do I access this? Are there new files that I can download? Configurations that I can change? I'm trying to sell my department on this product, and having real usernames is vital (having the ability to add users rather than inviting them would be great too, but right now I can deal with the invite as long as folks can get user names and not numbers).

Thanks

mrogers
Star Contributor
Star Contributor
The latest version (Labs 3.2 preview) of alfresco allows you to plug in a user name generator into the invitation process.
Out of the box it will generate users with firstName_lastName

You can tweak the pattern or plug in your own user name generator.
See invitation-service-context.xml and the definition of "userNameGenerator" in authentication-services-context.xml.

As 'ursash' says a work-around for older versions is to create the user account first and then invite an existing alfresco user rather than relying on the invite process to generate a new account.