From b191afcb5bb19e11b340a5092b3205ac67b4e4a7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 23 Dec 2016 00:43:03 +0100 Subject: Fix confirmation email being sent to old address when changing it --- app/mailers/user_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/mailers/user_mailer.rb') diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index e3ca39b3a5d..3b4d4d0764d 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -9,7 +9,7 @@ class UserMailer < Devise::Mailer @token = token I18n.with_locale(@resource.locale || I18n.default_locale) do - mail to: @resource.email + mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email end end -- cgit v1.2.3