Merge pull request #1244 from mailpoet/import

Normalizing emails during the import to avoid integrity constraint violation [MAILPOET-1271]
This commit is contained in:
stoletniy
2018-01-23 19:35:45 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ class Import {
if(!is_email($email)) {
$invalid_records[] = $index;
}
return $email;
return strtolower($email);
}, array_keys($data), $data
);
}

View File

@ -23,7 +23,7 @@ class ImportTest extends \MailPoetTest {
array(
'Adam',
'Smith',
'adam@smith.com',
'Adam@smith.com', // capitalized to test normalization
'France'
),
array(