]> cat aescling's git repositories - mastodon.git/commitdiff
Fix confirmation email being sent to old address when changing it
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 22 Dec 2016 23:43:03 +0000 (00:43 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 22 Dec 2016 23:43:03 +0000 (00:43 +0100)
app/assets/javascripts/components/locales/en.jsx
app/mailers/user_mailer.rb

index ddd7dd0c854bc9e7ef8cd024d5ebe7d99f02a059..50007a7da2a6e356f75e3457c24aef2d364d8ec5 100644 (file)
@@ -22,6 +22,7 @@ const en = {
   "account.follows": "Follows",
   "account.followers": "Followers",
   "account.follows_you": "Follows you",
+  "account.requested": "Awaiting approval",
   "getting_started.heading": "Getting started",
   "getting_started.about_addressing": "You can follow people if you know their username and the domain they are on by entering an e-mail-esque address into the search form.",
   "getting_started.about_shortcuts": "If the target user is on the same domain as you, just the username will work. The same rule applies to mentioning people in statuses.",
index e3ca39b3a5d244856e3704317f6fa480fa783e19..3b4d4d0764d7b51500baa37211229a294314f9e1 100644 (file)
@@ -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