mirror of https://github.com/zulip/zulip.git
emails: Use common_context for email change notifications.
This also lets us remove `realm_uri`.
This commit is contained in:
parent
d0a9e92f1d
commit
28eaf5620e
|
@ -10,7 +10,7 @@
|
|||
|
||||
<p>
|
||||
We received a request to change the email address for the Zulip
|
||||
account on {{ realm.uri }} from {{ old_email }} to {{ new_email }}.
|
||||
account on {{ realm_uri }} from {{ old_email }} to {{ new_email }}.
|
||||
If you would like to confirm this change, please click here:
|
||||
<a class="button" href="{{ activate_url }}">Confirm email change</a>
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Hi!
|
||||
|
||||
We received a request to change the email address for the Zulip account on
|
||||
{{ realm.uri }} from {{ old_email }} to {{ new_email }}. If you would like
|
||||
{{ realm_uri }} from {{ old_email }} to {{ new_email }}. If you would like
|
||||
to confirm this change, please click this link:
|
||||
|
||||
{{ activate_url }}
|
||||
|
|
|
@ -649,8 +649,13 @@ def do_start_email_change_process(user_profile, new_email):
|
|||
user_profile=user_profile, realm=user_profile.realm)
|
||||
|
||||
activation_url = create_confirmation_link(obj, user_profile.realm.host, Confirmation.EMAIL_CHANGE)
|
||||
context = {'realm': user_profile.realm, 'old_email': old_email, 'new_email': new_email,
|
||||
'activate_url': activation_url}
|
||||
from zerver.context_processors import common_context
|
||||
context = common_context(user_profile)
|
||||
context.update({
|
||||
'old_email': old_email,
|
||||
'new_email': new_email,
|
||||
'activate_url': activation_url
|
||||
})
|
||||
send_email('zerver/emails/confirm_new_email', to_email=new_email,
|
||||
from_name='Zulip Account Security', from_address=FromAddress.NOREPLY,
|
||||
context=context)
|
||||
|
|
Loading…
Reference in New Issue