Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291136

Change subject: Keep Civi users off suppression list
......................................................................

Keep Civi users off suppression list

This makes sure the email address used as the drupal identifier
is not added to the suppression list.  Other emails associated
with the contact may still end up there.

Bug: T122411
Change-Id: I4fc4d7557e7c8c8c2aacb4aa38f4a90e5ac556f7
---
M silverpop_export/update_table.sql
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/36/291136/1

diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index 4416ebb..149d526 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -318,6 +318,14 @@
     ON s.email = silverpop_excluded.email
     WHERE s.opted_out = 0;
 
+-- We don't want to suppress emails of Civi users.
+-- Conveniently, the account name is the email address in
+-- in the table that associates contacts with accounts.
+DELETE silverpop_excluded
+  FROM silverpop_excluded
+  JOIN civicrm.civicrm_uf_match m
+    ON m.uf_name = silverpop_excluded.email;
+
 -- Prepare the persistent export table.
 DROP TABLE IF EXISTS silverpop_export;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/291136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fc4d7557e7c8c8c2aacb4aa38f4a90e5ac556f7
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to