소스 검색

Add skeleton of script to clean email database

Laurent Destailleur 4 년 전
부모
커밋
d9beced0e3
1개의 변경된 파일17개의 추가작업 그리고 5개의 파일을 삭제
  1. 17 5
      scripts/emailings/reset-invalid-emails.php

+ 17 - 5
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 record and update the email to null if email into $groupofemails
+		// TODO
+	}
+
+	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 (empty($type) || $type == 'contact')
+	if ($type == 'all' || $type == 'user')
 	{
-		// 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 == 'member')
+	{
+		// Loop on each record and update the email to null if email into $groupofemails
+		// TODO
+	}
 
 
 if (!$error) {