DISQUS

Community Page on DISQUS

what is this?

Jump to original thread »
Author

No space

Started by paulmwatson · 3 months ago

Can anyone explain to me why most systems place restrictions on usernames? Why must a username never contain a space? Why must it be longer than 5 characters but shorter than 24? Why can’t I have a / followed by a ! and then a ” in my username?
If a user wants a ... Continue reading »

3 comments

  • The main reason certain characters aren’t allowed in user names is to allow parsing – either for subtext searching or for breaking a user name into parts (e.g. principal and authority). I wrote briefly about handling Windows credentials in 2004 (http://weblogs.asp.net/kennykerr/archive/2004/0...). Another common reason is to allow user names to be used in file system paths for example in the user profile directory path. Of course if you’re building a custom authentication system backed by a database there’s no reason to limit characters or length. Limiting length is also not very useful. If you have relatively few users (hundreds) then you’re not going to save much space or time with short user names. If you have relatively high numbers of users (thousands or millions) then you’re going to force users to create silly user names like paul1234. The main limitation is ensuring that the user name can be used as an indexed key in a database but then the limitation even for Unicode usernames would still be as high as 400 characters depending on the database engine.
  • Thanks for the info, Kenny. None of these considerations are helping the user though, just us developers which is the wrong, but common, way.
  • Exactly. I think that’s what I was trying to say. :)

Add New Comment

Returning? Login