Skip to content

Commit 275e486

Browse files
committed
Updated the email template that goes out for password setting on account creation, to give directions also for the case when the user already has a pre-existing account. Updated a test to match.
- Legacy-Id: 17939
1 parent 228f002 commit 275e486

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

ietf/ietfauth/tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import io
77
import logging # pyflakes:ignore
88
import os
9+
import re
910
import requests
1011
import requests_mock
1112
import shutil
@@ -117,10 +118,10 @@ def test_login_with_different_email(self):
117118
def extract_confirm_url(self, confirm_email):
118119
# dig out confirm_email link
119120
msg = get_payload_text(confirm_email)
120-
line_start = "http"
121+
line_re = r"http.*/.*confirm"
121122
confirm_url = None
122123
for line in msg.split("\n"):
123-
if line.strip().startswith(line_start):
124+
if re.search(line_re, line.strip()):
124125
confirm_url = line.strip()
125126
self.assertTrue(confirm_url)
126127

ietf/templates/registration/creation_email.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{% autoescape off %}{% load ietf_filters %}
22
Hello,
33

4-
{% filter wordwrap:78 %}We have received an account creation request for {{ username }} at {{ domain }}. In order to set a new password for the {{ username }} account, please go to the following link and follow the instructions there:{% endfilter %}
4+
{% filter wordwrap:78 %}We have received an account creation request for {{ username }} at {{ domain }}.{% endfilter %}
5+
6+
{% filter wordwrap:78 %}If you do not already have datatracker account, please go to the following link and follow the instructions there in order to set a new password for the {{ username }} account:{% endfilter %}
57

68
https://{{ domain }}{% url "ietf.ietfauth.views.confirm_account" auth %}
79

810
This link will expire in {{ expire }} days.
911

12+
{% filter wordwrap:78 %}If you already have a datatracker account, please go to the following link instead, and add the new email {{ username }} to your existing account:{% endfilter %}
13+
14+
https://{{ domain }}{% url "ietf.ietfauth.views.profile" %}
15+
16+
1017
Best regards,
1118

1219
The datatracker login manager service

0 commit comments

Comments
 (0)