Merge branch 'MDL-59737_master' of git://github.com/markn86/moodle
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user