Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Allow admins to set a limit on the length of usernames #389

Closed happy-river closed 3 years ago

happy-river commented 3 years ago

Some of our users are using entire sentences for their usernames. Our admins would like to be able to stop this behavior. Add site.username_max_length to the admin site configuration panel, and enforce the limit at registration.

Polsaker commented 3 years ago

Could you also set the maxlength attribute in the registration form? That'd make it a bit more user friendly

happy-river commented 3 years ago

Updated it to use a wtforms Validator to check the username length, and added a description of the expected length toth e field title for users to see when they hover over the field.