about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-01-20 16:37:35 -0600
committerGitHub <noreply@github.com>2018-01-20 16:37:35 -0600
commit24b6e4121f656d24adc5676e8a207ded610a7ea7 (patch)
tree1c7b908468e12a40a6433f02f86f2cf47fa53cf9 /app/mailers
parentb8c6656ce9e498f2e99d6301212bcd12e7f839df (diff)
parent3cae3622146d80aef8e43e5790d25f5e2fc9931e (diff)
Merge pull request #342 from glitch-soc/merge-upstream
Merge upstream
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/user_mailer.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index a7efa73c1..4104f6cd2 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -54,4 +54,15 @@ class UserMailer < Devise::Mailer
       mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject')
     end
   end
+
+  def welcome(user)
+    @resource = user
+    @instance = Rails.configuration.x.local_domain
+
+    return if @resource.disabled?
+
+    I18n.with_locale(@resource.locale || I18n.default_locale) do
+      mail to: @resource.email, subject: I18n.t('user_mailer.welcome.subject')
+    end
+  end
 end