diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/report_mailer.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb index 70a4b6e53..a9223c752 100644 --- a/app/mailers/report_mailer.rb +++ b/app/mailers/report_mailer.rb @@ -9,8 +9,11 @@ class ReportMailer < ActionMailer::Base :id => id } Role.admins.each do |role| - resource[:email] = User.find_by_id(role.person_id).email - format(resource).deliver + user = User.find_by_id(role.person_id) + if !user.user_preferences.exists?(:email_type => :someone_reported) + resource[:email] = user.email + format(resource).deliver + end end end |