diff --git a/includes/account.php b/includes/account.php index f026510..b8fed6b 100644 --- a/includes/account.php +++ b/includes/account.php @@ -87,6 +87,15 @@ exit; } $row = mysql_fetch_assoc($res); + $body = sprintf(_("Hi %s,"),$_SESSION['_config']['user']['fname'])."\n"; + $body .= _("You are receiving this email because you or someone else")."\n"; + $body .= _("has changed the default email on your account.")."\n\n"; + + $body .= _("Best regards")."\n"._("CAcert.org Support!"); + + sendmail($_SESSION['_config']['user']['email'], "[CAcert.org] "._("Default Account Changed"), $body, + "support@cacert.org", "", "", "CAcert Support"); + $_SESSION['profile']['email'] = $row['email']; $query = "update `users` set `email`='".$row['email']."' where `id`='".$_SESSION['profile']['id']."'"; mysql_query($query); @@ -1000,6 +1009,15 @@ mysql_query("update `users` set `password`=sha1('".$_SESSION['_config']['user']['pword1']."') where `id`='".$_SESSION['profile']['id']."'"); echo _("Your Pass Phrase has been updated and your primary email account has been notified of the change."); + + $body = sprintf(_("Hi %s,"),$_SESSION['_config']['user']['fname'])."\n"; + $body .= _("You are receiving this email because you or someone else")."\n"; + $body .= _("has changed the password on your account.")."\n"; + + $body .= _("Best regards")."\n"._("CAcert.org Support!"); + + sendmail($_SESSION['_config']['user']['email'], "[CAcert.org] "._("Password Update Notification"), $body, + "support@cacert.org", "", "", "CAcert Support"); } } showfooter(); diff --git a/pages/account/13.php b/pages/account/13.php index 4631793..36d33db 100644 --- a/pages/account/13.php +++ b/pages/account/13.php @@ -1,5 +1,5 @@ + Copyright (C) 2004-2006 by Duane Groth This file is part of CAcert. @@ -16,6 +16,14 @@ $year = intval(substr($_SESSION['_config']['user']['dob'], 0, 4)); $month = intval(substr($_SESSION['_config']['user']['dob'], 5, 2)); $day = intval(substr($_SESSION['_config']['user']['dob'], 8, 2)); + + $body = sprintf(_("Hi %s,"),$_SESSION['_config']['user']['fname'])."\n"; + $body .= _("You are receiving this email because you or someone else")."\n"; + $body .= _("has viewed your lost password questions.")."\n"; + + $body .= _("Best regards")."\n"._("CAcert.org Support!"); + + sendmail($_SESSION['_config']['user']['email'], "[CAcert.org] "._("Email Notification"), $body, "support@cacert.org", "", "", "CAcert Support"); ?>