summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-09 02:12:22 +0200
committerlpsolit%gmail.com <>2005-09-09 02:12:22 +0200
commitb539673d7f2d7d7a59d07b0835750b613f0a8687 (patch)
tree496675cccc88ea197b89627c5aa2c6f049bfeac5
parentb173be41f6e36f7abd0134090b9906db3f2ffd30 (diff)
downloadbugzilla-b539673d7f2d7d7a59d07b0835750b613f0a8687.tar.gz
bugzilla-b539673d7f2d7d7a59d07b0835750b613f0a8687.tar.xz
Bug 305523: Email preference for "CC changed" should be disabled by default for new users - Patch by Gervase Markham <gerv@mozilla.org> r=wicked a=justdave
-rw-r--r--Bugzilla/User.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index ca01e0842..024645eaf 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -1170,6 +1170,13 @@ sub insert_new_user {
foreach my $rel (RELATIONSHIPS) {
foreach my $event (POS_EVENTS, NEG_EVENTS) {
+ # These "exceptions" define the default email preferences.
+ #
+ # We enable mail unless the change was made by the user, or it's
+ # just a CC list addition and the user is not the reporter.
+ next if ($event == EVT_CHANGED_BY_ME);
+ next if (($event == EVT_CC) && ($rel != REL_REPORTER));
+
$dbh->do("INSERT INTO email_setting " .
"(user_id, relationship, event) " .
"VALUES ($userid, $rel, $event)");