Why are usernames so restrictive?


(Ilya S. Ivanov) #36

Dealing with names in general case is not easy, I agree, but I mean something different. So, maybe my objection isn’t so much against nicknames, but about constraints that enforce it to become less readable and at all that change it from what I would like to see to what I wouldn’t. If you call yourself rpglover64, its OK, I respect your choice and I will call you exactly this way. But I call myself Ilya S. Ivanov, it’s not actually my exact name in Russian, but it is something what looks to me like my name in English, and I like it. What I expect from Discourse is to just use my name as I call myself with my google account, and don’t introduce to me a concept of username. Some web applications do it well, why not here? It’s kinda the most disappointing thing about Discourse, it’s something alien for me. I just wanna use my google identity to communicate here. By the way, livejournal allows to comment from different social networks, and other users see what network the comment came from. It’s about not enforcing people to create a new identity specially for “yet another” web application what is a respectful approach, I think.


(Ilya S. Ivanov) #37

By the way, I see that in “activity” page the name (instead of username) is used to visualization. So maybe it’s just a work in progress to see it everywhere, or there is an option like “I want the application to use my name where possible”?


(ɯu) #38

It would be useful if the sign-up page gave some info about usernames, such as:

  • must be greater than 3 characters & less than ??? characters
  • first character of username must be a-z (or whatever the rule is)
  • username characters must be a-z or 0-9 or _ (underscore) or ???
  • any other username restrictions
  • You will be able to change your username so don’t stress too much about it now!

My #1 username wish: Allow 2-character usernames so, e.g., I could be @nm like I am on Twitter and Identi.ca.

Thanks for Discourse.org, it looks good!


(Jeff Atwood) #39

The input box will tell you what you need as you type it, I don’t believe in dumping a bunch of extraneous information on people while they are signing up.


(Arnaud Berthomier) #40

Let’s be even bolder, and start at one-letter usernames. Just like Twitter…


(Tamal White) #41

I look forward to the pull request!

Having said that, I think usernames should be restricted. Imagine you become the famous discourser “vilx-”. A poseur could make any number of imitation accounts: vilx–, vilx—, v¡lx-. One can go down the rabbit hole of blacklisting illegal URL characters, Unicode characters that look like ASCII characters, etc. or implement a elegant and beautiful whitelist.

Want to add “-” to the whitelist? Pull request!


Usernames with periods are changed to underscore
(Valts Sondors [take 2]) #42

You can do that perfectly well with simple ASCII too.


(Sam Saffron) #43

I went ahead an relaxed the username rules:

https://github.com/discourse/discourse/commit/262f561a877e0296d7ca7f6ec9f27edd0d30ca8e

Per this change here are some examples of allowed usernames:

first.last
first
first-last
_name
first_last
mc.hammer_nose
UPPERCASE
sgif

Here are some examples of disallowed names:

traildot.
has space
double__underscore
with%symbol
Exclamation!
@twitter
my@email.com
.tester
sa$sy
sam.json
sam.xml
sam.html
sam.htm
sam.js
sam.woff
sam.Png
sam.gif

I think this round of rule relaxation handles the vast majority of the complaints we had over the years (with a minor exception of people wanting unicode stuff in usernames for, say, a Chinese site)

New rules are

  1. You can lead with a letter, number or underscore
  2. No two special chars are allowed in a row ( ._- are considered special)
  3. You can not trail with a special char
  4. - is now allowed
  5. . is now allowed
  6. You can not trail with a know file extension type: sam.json and sam.gif are disallowed

What are the rules for usernames?
How to support unicode-style username?
_ in-front of Username
(Erick Guan) #44

I am still getting a lot of request for Unicode in username from Chinese though. But I am not sure whether it’s ok to revive this topic.


(Sam Saffron) #45

It’s ok to revive, but Unicode would be a much more complex change


(Keith Newton) #48

I just ran into a problem with this on my site. It uses SSO and my account creation page didn’t have unicode restrictions like Discourse did. A user created a username with word ‘Ʀed’ in it and the ‘Ʀ’ character has rendered his account 80% inoperable. I had just assumed Discourse would have unicode support due to Asian users. I would like to cast my vote for having a discussion around adding unicode support. What are the major blockers to adding support?


(Mittineague) #49

Would conversion to a “similar” character (if possible to do) be an alternative?
Not ideal granted, but it seems to me it would be “good enough”


(Keith Newton) #50

That’s a solution for this particular user however it still won’t solve the problem for Asian users.


(Jeff Atwood) #51

I guess the error in this case is we allowed SSO to create an invalid username. Is that possible @sam?


(Sam Saffron) #52

It really should not allow invalid usernames, but sounds like it is somehow doing it.


(Xiaohao Zhang) #53

Single sign-on (sso) user didn’t work, still is. To _ (1.4.1 version)
like zonghao.zhang to zonghao_zhang


(se oli tonnin seteli) #55

What happens to spaces in usernames when importing users from other bb software, in my situation, BBPress to Discourse?

I smell trouble a brewin’.


(James North) #56

When I imported from phpbb, it just removes the spaces.

Jill Smith becomes JillSmith.

I’d assume most sanctioned scripts share that feature.


(se oli tonnin seteli) #57

OK, I could live with this. I might follow up on results hopefully.


(Joshua Rosenfeld) #58

I would always encourage this. No import script is perfect, so anyone running an import should plan to look through the result and be prepared to tweak some things that didn’t work perfectly.