From f0c0b446daf20979c1666b48ef8ed85ca46ce44c Mon Sep 17 00:00:00 2001 From: baarkerlounger <5101747+baarkerlounger@users.noreply.github.com> Date: Tue, 21 Jun 2022 09:32:18 +0100 Subject: [PATCH] Update email taken string (#681) --- app/mailers/devise_notify_mailer.rb | 2 ++ config/locales/en.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/mailers/devise_notify_mailer.rb b/app/mailers/devise_notify_mailer.rb index 2e77c8b17..827e81b56 100644 --- a/app/mailers/devise_notify_mailer.rb +++ b/app/mailers/devise_notify_mailer.rb @@ -44,6 +44,8 @@ class DeviseNotifyMailer < Devise::Mailer end def intercept_send?(email) + return false unless email_allowlist + email_domain = email.split("@").last.downcase !(Rails.env.production? || Rails.env.test?) && email_allowlist.exclude?(email_domain) end diff --git a/config/locales/en.yml b/config/locales/en.yml index e6f94d28b..881179317 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -52,7 +52,7 @@ en: outside_collection_window: "Date must be within the current collection windows" postcode: "Enter a postcode in the correct format, for example AA1 1AA" email: - taken: "Email already exists" + taken: "Enter an email address that hasn’t already been used to sign up" invalid: "Enter an email address in the correct format, like name@example.com" blank: "Enter an email address" role: