Max length for real name field?

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.

2 个赞

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.

7 个赞

Should we add rudimentary protection for this @eviltrout?

6 个赞

That’s an interesting error message. This fixes it and makes it work a lot more nicely:

https://github.com/discourse/discourse/commit/ee17138c0f09cc9621fde3355bd32ca1b0b0c3e2

5 个赞

Thank you for adding this! Would it also be possible to set the maxlength in the admin cp just like with the username?

1 个赞

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.

3 个赞