Skip to content
Snippets Groups Projects
Commit 79b815f9 authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[accounts][management][commands] send temporary link for yearly revalidation users

parent c172c21e
No related branches found
No related tags found
1 merge request!328Improve automatic emails with temporary urls
......@@ -40,6 +40,7 @@ from django.template import loader
from ...models import SupervisionTrack
from ...models import Profile
from ...models import TemporaryUrl
from ....ui.registration.models import RegistrationProfile
from ....utils import mail
......@@ -210,9 +211,14 @@ class Command(BaseCommand):
if supervisiontrack.expiration_date.date() - now.date() == datetime.timedelta(days=expiration_reminder):
warned_count += 1
temp_url = TemporaryUrl()
temp_url._generate_temporary_url(TemporaryUrl.YEARREVALIDATION, supervisiontrack)
context = {
'user': user,
'expiration_date': supervisiontrack.expiration_date.date(),
"prefix": server_address,
"temp_url": temp_url.url_hash,
}
mail.send_email('registration/mail.account_revalidation.subject.txt',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment