mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 09:58:23 +02:00
Add links to resend mail confirmations
This commit is contained in:
@ -12,7 +12,7 @@ from django.urls import reverse, reverse_lazy
|
||||
from django.utils.encoding import force_bytes
|
||||
from django.utils.http import urlsafe_base64_encode
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from registration.tokens import account_activation_token
|
||||
from registration.tokens import email_validation_token
|
||||
from note.models import MembershipTransaction
|
||||
|
||||
|
||||
@ -73,13 +73,13 @@ class Profile(models.Model):
|
||||
|
||||
def send_email_validation_link(self):
|
||||
subject = "Activate your Note Kfet account"
|
||||
message = loader.render_to_string('registration/account_activation_email.html',
|
||||
message = loader.render_to_string('registration/email_validation_email.html',
|
||||
{
|
||||
'user': self.user,
|
||||
'domain': "nk20.ynerant.fr",
|
||||
'site_name': "La Note Kfet",
|
||||
'protocol': 'https',
|
||||
'token': account_activation_token.make_token(self.user),
|
||||
'token': email_validation_token.make_token(self.user),
|
||||
'uid': urlsafe_base64_encode(force_bytes(self.user.pk)).decode('UTF-8'),
|
||||
})
|
||||
self.user.email_user(subject, message)
|
||||
|
Reference in New Issue
Block a user