From 105a8f399f97603f79ca2a0ec79214ac2335135f Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 9 Aug 2006 20:39:24 +0000 Subject: [PATCH] obfuscation of the email addresses --- login/forgot_password.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/login/forgot_password.php b/login/forgot_password.php index 72c42ade55d..384726b9a44 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'); }