From f1dd575c6ff45327cf14061e1b2f619300f2c142 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 7 Aug 2017 13:37:10 +0800 Subject: [PATCH] MDL-59737 core_backup: changed reference to domain doesntexist.com --- backup/util/helper/backup_anonymizer_helper.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backup/util/helper/backup_anonymizer_helper.class.php b/backup/util/helper/backup_anonymizer_helper.class.php index f3b5925a142..9ccd8876141 100644 --- a/backup/util/helper/backup_anonymizer_helper.class.php +++ b/backup/util/helper/backup_anonymizer_helper.class.php @@ -56,8 +56,10 @@ class backup_anonymizer_helper { if (preg_match('/^anon\d*$/', $user->username)) { $match = preg_match('/^anonfirstname\d*$/', $user->firstname); $match = $match && preg_match('/^anonlastname\d*$/', $user->lastname); - $match = $match && preg_match('/^anon\d*@doesntexist\.com$/', $user->email); - if ($match) { + // Check .com for backwards compatibility. + $emailmatch = preg_match('/^anon\d*@doesntexist\.com$/', $user->email) || + preg_match('/^anon\d*@doesntexist\.invalid$/', $user->email); + if ($match && $emailmatch) { return true; } } @@ -93,7 +95,7 @@ class backup_anonymizer_helper { public static function process_user_email($value) { static $counter = 0; $counter++; - return 'anon' . $counter . '@doesntexist.com'; // Just a counter + return 'anon' . $counter . '@doesntexist.invalid'; // Just a counter. } public static function process_user_icq($value) {