From 9fbdeeb6c68bc7c99e386dd0a80068dec81663ca Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Thu, 18 Oct 2012 14:36:52 -0400 Subject: [PATCH] Send email change notice email to both old and new email addresses. --- common/djangoapps/student/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index bf325a994b..b2fcc73ca3 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -654,9 +654,12 @@ def confirm_email_change(request, key): meta['old_emails'].append([user.email, datetime.datetime.now().isoformat()]) up.set_meta(meta) up.save() + # Send it to the old email... + user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL) user.email = pec.new_email user.save() pec.delete() + # And send it to the new email... user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL) return render_to_response("email_change_successful.html", d)