-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
More Graceful handling of existing usernames for user creation #1372
Comments
Two potential ideas here, either take them directly to the Edit Profile page when they're signed in so they can change their username and other info, or on return from the SSO allow them to change the username on a separate page, maybe an unnecessary step in the long run though. As a sidenote it would be good if we could include something along the lines of if they registered using Twitter, ask politely for an email address, maybe via a tooltip similar to "You need to be logged in to do this" etc, something along the lines of "Please add an email address to your profile". Although forwarding straight to the profile edit may make a percentage of users fill it in automatically. |
The difficult part is we can't risk having "bad" data being inserted into the database, e.g. SSO registration attempts to register a user with an existing username, so we insert the user as-is, and then redirect them to their profile to change it. ... but if somebody simply navigates away from that page, then the db is left in a state where two users have the same username 👎 Perhaps prior to registration, we can take them to a special page to fill out any "required" profile data*, username included if necessary. * separate feature request, but perhaps we can kill two birds with one stone |
It's probably a bit of a cheap hack, and may not even work, but how about if username already exists, append it with a random string, that way, even if that user does leave the page, it won't be a duplicate username. Their username will just look like a5mith215 or a5mith317 etc. Definitely a tough one though. As the whole point of social registration is to not deal with forms. 👎 |
Hahha, yeah that was one potential "solution". IRC-style, name taken? You get your name + an underscore. Would be an acceptable stop-gap solution. |
You have to take a large scale style approach. I'm in favor for appending a number to the username, perhaps put a notification saying that "Your username is already taken. We added a number behind it but you chan change it on your Profile" Using an underscore would bring in the issue of of multiple users using the same username. Ex:
🐱 |
Using a single number, or predefined number would also cause the same issue, iamcardinal1, then iamcarinal11 etc, a random string would solve that, iamcardinal317, iamcardinal417 etc. |
You can use increasing numbers, iamcardinal1, iamcardinal2, iamcardinal3... |
Right now when an SSO plugin tries to create a new user, it checks for an existing user, and rejects it if one exists.
Normally user registration handles this by not allowing the form to submit, but SSO is different.
Perhaps after the user is verified they can be taken to a separate page to choose a new username?
The text was updated successfully, but these errors were encountered: