Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

Should usernames be unique? It would get rid of annoying id numbers and reduce impersonation. After all, why would anybody want others to have the same name as them? On the other hand, a new user might not be able to sign up with their real name. In real life you can have any name you want.

So which is better?

share|improve this question
4  
@JonathanHobbs I do! –  BlueFlame May 12 at 1:57
2  
Look at the SE sites. They seem to be working well without unique usernames. –  PlasmaHH May 12 at 8:43
1  
@PlasmaHH: +1 yes, but to all intents and purposes these are not user names, but "display" names (nitpicking I know, but still, it only works because I can distinguish to users with the same display name possibly by their avatar, but certainly by their ID number). –  Marjan Venema May 12 at 12:00
1  
@MarjanVenema: Your nitpicking seems to imply that when a user name is not a display name, it must be a unique id, and that when it is not unique, its just a display name since there is always a way to distinguish by some unique key (and there always needs to be a unique key) –  PlasmaHH May 12 at 12:15
1  
@MarjanVenema: So if your definition implies that usernames are the unique id, then the question of them being or being not unique seems to make no sense, no? –  PlasmaHH May 12 at 12:18

3 Answers 3

up vote 16 down vote accepted

It really all depends on your approach. These days it is easier to ask people to log in by email, which can be used as a user name and should be unique. It is sometimes hard to remember the username you have for some sites as they may differ from other sites you visit. By doing email you are ensuring it would be unique.

One thing to keep in mind though is that you should definitely make an ID for each user. From there you assign an email or even a username. This would allow the user to change it at any time even if you don't intend to allow them to do this. Otherwise you may pin yourself in a corner and would have a hard time improving your approach.

Another thing you can also do is implement a dual email and username login approach. An example is Facebook. You can login to facebook with your username, your email or even your phone number. Username should definitely be unique in nearly all cases. However you can add a field if you wish for display name, which won't have to be unique. Yes it is slightly more complicated to build, but in the end you are reducing friction for your users and making it far easier for them to come back.

share|improve this answer
    
An email? I didn't think of that. –  bjb568 May 12 at 2:11
    
Email is easiest to remember, they use it every day. Technically speaking an email is a username also. –  Francis Pelland May 12 at 2:53
3  
Please do note that you might still want to enforce a unique username for your users depending on how much interaction there is between them. If you are running a forum, a chat group or another user interaction heavy service, knowing that a specific username will always refer to the same person helps with moderation and reputation. Also, a number of people would never want to use personally identifyable information as their username, like their email address. For Example: a few years ago, the World of Warcraft forums were in an uproar because Blizzard wanted to force people to use real names. –  Nate Kerkhofs May 12 at 8:51
2  
Contrary to your assumption, I use the same username on all sites I sign up to, but give them different email addresses to spam me. Therefore I am far more likely to remember my username (and with Lastpass this is almost guaranteed) but I may forget the email address that I gave them. –  dotancohen May 12 at 12:26
2  
I found out the hard way that an email address is not as great an idea as you may think... Sure one email belongs to one user... But one user can have many emails :P –  deadlyDev May 12 at 12:58

Forcing unique usernames is a necessary side effect of the way things work. You have to give everyone a unique something to distinguish them. But it's not necessary that this unique thing be their name! A unique e-mail would do, a unique internally generated id would do. In school days, a roll number/student id did the job.

Facebook doesn't force unique names for users, they generate IDs for everyone. Twitter has to force a unique handle but you name can be your real name! Totally depends on your application!

share|improve this answer
    
I know I have to have a "unique something", I'm wondering what the user will like that something to be. –  bjb568 May 12 at 2:09
    
depends on how much they're gonna use that something. fb ids are never used by user but twitter handles are. What are you working on? –  BlueFlame May 12 at 2:13
    
Well, everything will be username-based. I'm not going to publicly hand out emails (in the place of usernames). –  bjb568 May 12 at 2:17
    
Then use something like twitter handles and embrace the necessary side effect. –  BlueFlame May 12 at 2:23
    
So your answer is yes. Should login be by still be by email if usernames are unique? –  bjb568 May 12 at 2:25

I think whatever the token is that you use for logging the user in, it should be unique.

I think the real question is, should they login with a username or an email address? My thought is they should always login with an email address for a few reasons:

  • Most people are more likely to remember their email address. Personally I have 3 email addresses (2 businesses, 1 personal) but I have half a dozen usernames
  • If you are running a social website where the username represents an online identity that others can see (forums, chatrooms, etc - which I personally think is one of the only situations where a username should be used), you are now advertising half of your login to the world. Regardless of if your site needs a username, I believe you should use the email address. Of course, these aren't always secured, and that's why a good password is important.
    • In this case the username probably doesn't need to be unique, unless you have another reason for it, like a personalized URL or something (website.com/u/your_username)
  • The email address is automatically going to be unique(ish) to the user. There are situations where couples share an email, but if they want to maintain a shared identity, then that's their choice.

tl;dr; use email addresses as the login token. I recommend only allowing users to create a username if that username needs to be used to represent the users identity somehow - but even then, login with the email address.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.