]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 305523: Email preference for "CC changed" should be disabled by default for new...
authorlpsolit%gmail.com <>
Fri, 9 Sep 2005 00:16:31 +0000 (00:16 +0000)
committerlpsolit%gmail.com <>
Fri, 9 Sep 2005 00:16:31 +0000 (00:16 +0000)
Bugzilla/User.pm

index 0e34957521d4b896c74e106f95c3542a72c321d0..55daccefcce923339b8bd482df3412d681e8d8c5 100644 (file)
@@ -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)");