8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-20 09:32:29 +00:00

Improve check did_set_initial_passwd in new_user

This commit is contained in:
Jean-Romain Garnier 2020-04-17 21:18:10 +02:00 committed by Gabriel Detraz
parent c00bb2573b
commit aad7110fd2
2 changed files with 1 additions and 2 deletions

View file

@ -504,7 +504,6 @@ class AdherentCreationForm(AdherentForm):
if set_passwd:
user.set_password(self.cleaned_data["password1"])
user.did_set_initial_passwd = set_passwd
user.save()
return user

View file

@ -126,7 +126,7 @@ def new_user(request):
if user.is_valid():
user = user.save()
if user.did_set_initial_passwd:
if user.pwd_ntlm:
user.send_confirm_email_if_necessary(request)
messages.success(
request,