From d9beced0e393a020ef9076b2bb4a8032377771b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Nov 2020 12:09:36 +0100 Subject: [PATCH] Add skeleton of script to clean email database --- scripts/emailings/reset-invalid-emails.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/emailings/reset-invalid-emails.php b/scripts/emailings/reset-invalid-emails.php index 1b27130b8a6..de6b180e208 100755 --- a/scripts/emailings/reset-invalid-emails.php +++ b/scripts/emailings/reset-invalid-emails.php @@ -67,24 +67,36 @@ if (!empty($login)) $db->begin(); -// Loop on the entry file to get the 100 first entries + +// TODO Loop on the entry file to get the 100 first entries $groupofemails = array(); // For each groupofemail, we update tables to set email field to empty - if (empty($type) || $type == 'thirdparty') + if ($type == 'all' || $type == 'thirdparty') { - // Loop on each thirdparty and update the email to null if email into $groupofemails + // Loop on each record and update the email to null if email into $groupofemails // TODO } - if (empty($type) || $type == 'contact') + if ($type == 'all' || $type == 'contact') { - // Loop on each thirdparty and update the email to null if email into $groupofemails + // Loop on each record and update the email to null if email into $groupofemails // TODO } + if ($type == 'all' || $type == 'user') + { + // Loop on each record and update the email to null if email into $groupofemails + // TODO + } + + if ($type == 'all' || $type == 'member') + { + // Loop on each record and update the email to null if email into $groupofemails + // TODO + } if (!$error) {