Skip to content

Commit

Permalink
Fix for update user password
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Jan 22, 2025
1 parent 8aefb4c commit b1c061d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion g3w-admin/usersmanage/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from django.utils.datastructures import MultiValueDict
from django.utils.translation import gettext_lazy as _
from django.contrib.auth.forms import (
BaseUserCreationForm,
UserCreationForm,
ReadOnlyPasswordHashField,
AuthenticationForm,
Expand Down Expand Up @@ -565,6 +566,7 @@ def save(self, commit=True):
user.set_password(self.cleaned_data['password1'])
user.save()


# for save groups
if 'groups' not in self.cleaned_data:
self.cleaned_data['groups'] = self.request.user.groups.all()
Expand Down Expand Up @@ -748,7 +750,6 @@ def clean_username(self):

return username


def clean_password2(self):
password1 = self.cleaned_data.get("password1")
password2 = self.cleaned_data.get("password2")
Expand Down

0 comments on commit b1c061d

Please sign in to comment.