From aad7110fd2e06da8f35d7618166a4e9498b505fd Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 17 Apr 2020 21:18:10 +0200 Subject: [PATCH] Improve check did_set_initial_passwd in new_user --- users/forms.py | 1 - users/views.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/users/forms.py b/users/forms.py index 25e6c1b4..687c9e11 100644 --- a/users/forms.py +++ b/users/forms.py @@ -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 diff --git a/users/views.py b/users/views.py index 551fd350..78c0332e 100644 --- a/users/views.py +++ b/users/views.py @@ -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,