Question about max username length


(Philip Colmer) #1

In Usernames on top, lifting username length restrictions, there is a lengthy discussion about lifting the max username length restriction.

The first post gives an example of the length being increased to 40, but Usernames on top, lifting username length restrictions (post 25) says that it has been officially bumped from 15 to 20.

Is it safe to make it more than 20 characters? The reason I ask is because we’ve tied our Discourse implementation to our LDAP system for SSO, and we’re using the LDAP usernames as the Discourse usernames … and some of our users have got very long names, e.g. moorthy.baskaravenkatraman-sambamoorthy.

What is the maximum length that the system has been tested with? I don’t want to break Discourse by putting in a value that is too high …

Thanks.


(Jonathan) #2

Great idea, I’ve been wondering about this myself!

Discourse has a maximum length so that other users can easily remember your username. It’s kind of like a shorthand to your actual name.

But I agree, 20 seems a little small


(Philip Colmer) #3

@JonnyGamer You make a good point about why Discourse might have a maximum length, although you only need to start typing someone’s name and Discourse offers matches. Looking at the linked post, I think that another reason was constraints on the layout but now that full names and usernames are displayed above the post, I hope that is less of an issue than it used to be.

Hopefully one of the devs will be able to chime in :slight_smile:


(HopscotchRemixer) #4

Yeah I agree, maybe closer to 30


(Jonathan) #5

That is very true :ok_hand:
Except trolling people can then make multiple account very easily that are really similar to the long username.

(For exceptionally long usernames, they get truncated, so after a certain amount of letters, you can see after that. Then someone could make multiple accounts, change one character, and it all gets really confusing)


On the Hopscotch Forum, we are already getting that. Trollers are created account that are the same exact as other users, except the lowercase “L” is an uppercase “i”

llllllllll - L’s
IIIIIIII - i’s

They are super similar

This is just one example


(Violet) #6

Yeh I once had a conversation on an alt with someone and they thought it was who the alt was impersonating until I told them.

Also telling the difference between an alt and a real person can be hard


(Andrew) #7

This would be fairly easy to fix wirh a bit of custom css, I would assume. just make the font monospace.


(Jonathan) #8

Yeah, that makes sense:

III iii
lll LLL

(Jonathan) #9

You mean me :joy:


(Jeff Atwood) #10

As far as I know, it is. You may see some UI breakage with extra long usernames that Discourse does not expect, though.

I haven’t checked the database schema to see what the absolute limit on username length as stored in the database is, though.


(HopscotchRemixer) #11

I, and I am sure some other people, would think that it might be a tire to type out long usernames, even with shortcuts, if there are many similar long usernames, it could take awhile to type