8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +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 Jean-Romain Garnier
parent e6680e0717
commit f7259ae69b
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,