aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 77e6cebb0..1768d7c48 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -2132,10 +2132,16 @@ sub wants_mail {
$relationship = REL_ANY;
}
+ my $wants_mail;
+ Bugzilla::Hook::process('user_wants_mail', { events => $events,
+ relationship => $relationship,
+ wants_mail => \$wants_mail });
+ return $wants_mail if defined $wants_mail;
+
# Skip DB query if relationship is explicit
return 1 if $relationship == REL_GLOBAL_WATCHER;
- my $wants_mail = grep { $self->mail_settings->{$relationship}{$_} } @$events;
+ $wants_mail = grep { $self->mail_settings->{$relationship}{$_} } @$events;
return $wants_mail ? 1 : 0;
}