From: lpsolit%gmail.com <> Date: Fri, 9 Sep 2005 00:16:31 +0000 (+0000) Subject: Bug 305523: Email preference for "CC changed" should be disabled by default for new... X-Git-Tag: bugzilla-2.20~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63e65544e41eab6140aa49a44d894b96e1d80df8;p=thirdparty%2Fbugzilla.git Bug 305523: Email preference for "CC changed" should be disabled by default for new users - Patch by Gervase Markham r=wicked a=justdave --- diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 0e34957521..55daccefcc 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1174,6 +1174,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)");