Improve error message for reserved usernames

AI-generated summary

The discussion revolves around improving error messages for reserved usernames. jordan1909 wants to customize the error message that appears when a user tries to change their username to a string containing a reserved substring, without affecting existing taken usernames. pfaffman suggests modifying the site text for “Sorry, that” to change the error message, but jordan1909 points out this would impact existing taken usernames. As a temporary solution, pfaffman recommends editing the message to “It’s taken or contains RESERVED WORD.” However, both agree that a more robust and explicit error message would be a reasonable feature request.

Hello all,
I have on my instance a reserved character string. When users attempt to change their usernames to this
however they get an error that it is already in use.

Is there a way I can specifically override that string only? To be more specific the string in a user account whena user goes to update their username manually.

To confirm, the username is NOT taken. It simply contains the reserved substring.

You can go to https://yoursite.com/admin/customize/site_texts?q=, search for “Sorry, that” and replace it with whatever you feel is most appropriate.

2 « J'aime »

@pfaffman

That would work however that would override a scenario when a username is in fact already taken.

We wouldn’t want to say username is taken when it just contains a reserved string.

For example:

jon is already in use but I updated that message. Jon now sees: Sorry, that username contains a reserved string

Get what I mean?

I do. In the immediate term, you can edit the message to say something like “It’s taken or contains RESERVED WORD.” That would give you a solution, albeit imperfect, immediately.

What you want seems like a reasonable feature request, as the error message could be more robust and explicit.

4 « J'aime »