Hello, I wonder wether it’s possible to set a max length on real names? There is one for usernames, but not for real names. (Or did I miss it?)
When they are displayed in posts this could be very long, especially when someone has a title also.
The discussion revolves around the maximum length for real name fields in Discourse. Queth inquires about setting a max length for real names, as there is one for usernames but not for real names. simon responds that there is no max length setting, and names longer than 200 characters produce an internal server error.
It is suggested that having a name length setting would be beneficial. codinghorror proposes adding protection for this, and eviltrout fixes the error message issue with a commit to the Discourse GitHub repository.
Queth thanks eviltrout for the fix and asks if it’s possible to set the maxlength in the admin control panel like with usernames. eviltrout responds that this is not currently possible, recommending instead that forum administrators enforce reasonable name lengths by contacting users with very long names and asking them to change them.
Hello, I wonder wether it’s possible to set a max length on real names? There is one for usernames, but not for real names. (Or did I miss it?)
When they are displayed in posts this could be very long, especially when someone has a title also.
There is no max length setting for real names that I am aware of. If a user tries to enter a name that is longer than 200 characters it will produce an internal server error. Very long names get truncated in the UI, so they don’t break the layout.
It might be a good idea to have a name length setting.
Setting a name to longer than 200 characters should give the user a proper error message instead of the current “500 Internal Server Error” message.
Should we add rudimentary protection for this @eviltrout?
That’s an interesting error message. This fixes it and makes it work a lot more nicely:
https://github.com/discourse/discourse/commit/ee17138c0f09cc9621fde3355bd32ca1b0b0c3e2
Thank you for adding this! Would it also be possible to set the maxlength in the admin cp just like with the username?
Not at this time. I recommend enforcing it on your forums by contacting users who use very long names and asking them to change them.