Give Anonymous a name (PR #3455)

Simple fix to ensure that Anonymous mode can be used even when names are required.


ActiveRecord::RecordInvalid (Validation failed: Name can't be blank)


Thanks for contributing this pull request! Could you please sign our CLA so we can review it?

Additionally, it might be possible to use a Zero-Width Space (U+200B) to ensure that no name is displayed by the Anonymous username.

Anonymous is fine, but it’ll have to be localizable. Can you make this change?

@ZogStriP I am unsure how to make that change here.

How would I proceed?

Edit: I think I managed to figure it out.

Why don’t you use the username as name? Discourse doesn’t show the name when it has the same value as the username and it would still meet the requirement, wouldn’t it?

I am not really sure about this…

anonymous21 “anoymous” … all through the forum seems a bit odd and extra verbose. I think a better strategy is allowing mods to assign an avatar for ALL anons.

Used @gschlager’s suggestion to properly fix the issue (cf. d4974b70938b07a60d8e6edbd258940a3aeb2c01)