From b539673d7f2d7d7a59d07b0835750b613f0a8687 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 9 Sep 2005 00:12:22 +0000 Subject: Bug 305523: Email preference for "CC changed" should be disabled by default for new users - Patch by Gervase Markham r=wicked a=justdave --- Bugzilla/User.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Bugzilla/User.pm') 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)"); -- cgit v1.2.3-24-g4f1b