obfuscation of the email addresses; merged from MOODLE_16_STABLE SC#282

This commit is contained in:
skodak 2006-08-09 20:40:31 +00:00
parent 8fd62c6401
commit 805f61dd6c

View File

@ -218,7 +218,8 @@ if (count($errors)) {
// check $page for appropriate page to display
if ($page=='emailconfirm') {
// Confirm (internal method) email sent
$txt->emailpasswordconfirmsent = get_string( 'emailpasswordconfirmsent','',$user->email );
$protectedemail = preg_replace('/([^@]*)@(.*)/', '???????@$2', $user->email); // obfuscate the email address to protect privacy
$txt->emailpasswordconfirmsent = get_string( 'emailpasswordconfirmsent','',$protectedemail );
notice( $txt->emailpasswordconfirmsent,$CFG->wwwroot.'/index.php');
}