Commit 4df0f1f5 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg Committed by Luko van der Maas
Browse files

Fix membership information email variables

parent bc5fb26a
......@@ -76,8 +76,21 @@ def send_information_request(dry_run=False):
with translation.override(member.profile.language):
email_body = loader.render_to_string(
'members/email/information_check.txt',
{'name': member.get_full_name(),
'member': member})
{'name': member.first_name,
'username': member.username,
'full_name': member.get_full_name(),
'address_street': member.profile.address_street,
'address_street2': member.profile.address_street2,
'address_postal_code':
member.profile.address_postal_code,
'address_city': member.profile.address_city,
'phone_number': member.profile.phone_number,
'birthday': member.profile.birthday,
'email': member.email,
'student_number': member.profile.student_number,
'starting_year': member.profile.starting_year,
'programme': member.profile.programme,
})
mail.EmailMessage(
'[THALIA] {}'.format(
_('Membership information check')),
......
......@@ -2,19 +2,19 @@
We currently have the following information about you in our database.
Via this email we'd like to ask you to check the accuracy of this data.
Username: {{ member.username }}
Name: {{ member.get_full_name }}
Address: {{ member.profile.address_street }}
{{ member.profile.address_street2 }}
{{ member.profile.address_postal_code }}
{{ member.profile.address_city }}
Phone: {{ member.profile.phone_number }}
Date of birth: {{ member.profile.birthday }}
Email address: {{ member.email }}
Student number: {{ member.profile.student_number }}
Cohort: {{ member.profile.starting_year }}
Programme: {{ member.profile.programme }}
{{ member }}
Username: {{ username|default_if_none:"" }}
Name: {{ name|default_if_none:"" }}
Address: {{ address_street|default_if_none:"" }}
{{ address_street2|default_if_none:"" }}
{{ address_postal_code|default_if_none:"" }}
{{ address_city|default_if_none:"" }}
Phone: {{ phone_number|default_if_none:"" }}
Date of birth: {{ birthday|default_if_none:"" }}
Email address: {{ email|default_if_none:"" }}
Student number: {{ student_number|default_if_none:"" }}
Cohort: {{ starting_year|default_if_none:"" }}
Programme: {{ programme|default_if_none:"" }}
You can change this data by logging into the website and using the 'edit profile' page.
Unable to edit the incorrect information? Then send an email: info@thalia.nu.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment