From: skodak Date: Wed, 9 Aug 2006 20:40:31 +0000 (+0000) Subject: obfuscation of the email addresses; merged from MOODLE_16_STABLE SC#282 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=805f61dd6c1b21ce9d6c45612a916656e74aa9d8;p=moodle.git obfuscation of the email addresses; merged from MOODLE_16_STABLE SC#282 --- diff --git a/login/forgot_password.php b/login/forgot_password.php index 72c42ade55..384726b9a4 100644 --- a/login/forgot_password.php +++ b/login/forgot_password.php @@ -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'); }