From d5831c5f1fc0ad707dbade4a41c403f3c11fa90c Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 28 Aug 2020 12:39:29 +0200 Subject: [PATCH] The reset_passw function should not set as not yet active users that have already been flaged active --- users/forms.py | 2 -- users/models.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/users/forms.py b/users/forms.py index 72475267..e4fe138f 100644 --- a/users/forms.py +++ b/users/forms.py @@ -269,8 +269,6 @@ class PassForm(FormRevMixin, FieldPermissionFormMixin, forms.ModelForm): """ user = super(PassForm, self).save(commit=False) user.set_password(self.cleaned_data.get("passwd1")) - user.state = User.STATE_NOT_YET_ACTIVE - user.set_active() user.save() diff --git a/users/models.py b/users/models.py index d338fa90..b6d09b7b 100755 --- a/users/models.py +++ b/users/models.py @@ -2190,7 +2190,7 @@ def user_post_save(**kwargs): if is_created: user.notif_inscription(user.request) - + user.set_active() user.state_sync() user.ldap_sync( base=True, access_refresh=True, mac_refresh=False, group_refresh=True