MDL-59737 core_backup: changed reference to domain doesntexist.com

This commit is contained in:
Mark Nelson 2017-08-07 13:37:10 +08:00
parent 8146b1f06d
commit f1dd575c6f

View File

@ -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) {