Fix forced-event-locale fallback #6021
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Forcing the event locale without taking the session into account is done when sending emails to others, since those should pretty much never use the user's current session locale but rather the event (or server) default locale.
There's still an issue where registration notifications to an unauthenticated user will not use their locale but the default one, but this cannot be fixed without storing the locale used during registration since at the time where we send a notification we do not know if the user self-registered or it was a manager registering them, so we do not know if it's safe to take the session locale into account.fixes #5987
TODO: