mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Don't set unavailable locales on the current user
This commit is contained in:
@@ -7,7 +7,7 @@ module I18nHelper
|
||||
end
|
||||
|
||||
# After logging in, check if the user chose a locale before
|
||||
if current_user_locale.nil? && cookies[:locale]
|
||||
if current_user_locale.nil? && cookies[:locale] && available_locale?(params[:locale])
|
||||
spree_current_user&.update!(locale: params[:locale])
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user