use HTML5 autocomplete values to better handle password managers

This commit is contained in:
Jens Langhammer
2019-03-02 23:19:58 +01:00
parent 35eef9c28d
commit 54427f7c68
3 changed files with 9 additions and 6 deletions

View File

@ -46,6 +46,7 @@ class UserChangePasswordView(FormView):
def form_valid(self, form: PasswordChangeForm):
try:
# user.set_password checks against Policies so we don't need to manually do it here
self.request.user.set_password(form.cleaned_data.get('password'))
self.request.user.save()
update_session_auth_hash(self.request, self.request.user)