Fix confirmation email being sent to old address when changing it
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user