Merge branch 'MDL-49493-master' of git://github.com/mastnym/moodle

This commit is contained in:
Dan Poltawski 2015-05-25 12:00:44 +01:00
commit e2a472e024

View File

@ -167,4 +167,48 @@ class backup_anonymizer_helper {
public static function process_user_imagealt($value) {
return ''; // No user imagealt
}
/**
* Anonymises user's phonetic name field
* @param string $value value of the user field
* @return string anonymised phonetic name
*/
public static function process_user_firstnamephonetic($value) {
static $counter = 0;
$counter++;
return 'anonfirstnamephonetic' . $counter; // Just a counter.
}
/**
* Anonymises user's phonetic last name field
* @param string $value value of the user field
* @return string anonymised last phonetic name
*/
public static function process_user_lastnamephonetic($value) {
static $counter = 0;
$counter++;
return 'anonlastnamephonetic' . $counter; // Just a counter.
}
/**
* Anonymises user's middle name field
* @param string $value value of the user field
* @return string anonymised middle name
*/
public static function process_user_middlename($value) {
static $counter = 0;
$counter++;
return 'anonmiddlename' . $counter; // Just a counter.
}
/**
* Anonymises user's alternate name field
* @param string $value value of the user field
* @return string anonymised alternate name
*/
public static function process_user_alternatename($value) {
static $counter = 0;
$counter++;
return 'anonalternatename' . $counter; // Just a counter.
}
}