Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Username length restrictions

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. 😁


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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 function validateUsernameRegex(). In that you can see that two config values are used (if they exist) for validating user names:



    So you only have to add $Configuration['Garden']['User']['ValidationLength'] = '{2,20}'; to your config.

  • Thought I already replied to this... anyway... THANKS!

Sign In or Register to comment.