HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options
Username length restrictions
eddieray7
New
My name is "Ed". Vanilla balks when I try to set my username to "Ed", claiming that it's not valid. There appears to be no setting to change the username length limitations from 3-20 characters to 2-20 characters. Should there be an option for changing the limits? I can hack the code every time I install an update, but it seems that 2-character or even 1-character usernames might be desirable (or even make complete sense, such as in my case) without having to resort to hacking at the source code. 😁
0
Comments
Well if you want to learn something about Vanilla, start hacking! If you want a simple answer look at the spoiler... 😉
Your hacking would have ended up in the file
functions.validation.php
which has the functionvalidateUsernameRegex()
. In that you can see that two config values are used (if they exist) for validating user names:Garden.User.ValidationRegex
Garden.User.ValidationLength
So you only have to add
$Configuration['Garden']['User']['ValidationLength'] = '{2,20}';
to your config.Thought I already replied to this... anyway... THANKS!