diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-04-10 00:35:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-10 00:35:49 +0200 |
commit | 36b39fbac55a9b141b99b54f193ec2702f8c3c39 (patch) | |
tree | 394b0d1d1e80f90c49511ce30fef01eda44b6d8c /app/models | |
parent | 2cb16c20a636a364b6d4d17f9588541a0d113731 (diff) |
Add preference to disable e-mails about new pending accounts (#10529)
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index c9309bc21..135baae12 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -191,6 +191,10 @@ class User < ApplicationRecord settings.notification_emails['report'] end + def allows_pending_account_emails? + settings.notification_emails['pending_account'] + end + def hides_network? @hides_network ||= settings.hide_network end @@ -295,7 +299,7 @@ class User < ApplicationRecord def notify_staff_about_pending_account! User.staff.includes(:account).each do |u| - next unless u.allows_report_emails? + next unless u.allows_pending_account_emails? AdminMailer.new_pending_account(u.account, self).deliver_later end end |