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