mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Password reset: Set needs_password_change to false
This commit is contained in:
@@ -350,6 +350,7 @@ class Recover(TemplateView):
|
||||
if not default_token_generator.check_token(user, self.request.GET.get('token')):
|
||||
return self.invalid('invalid')
|
||||
user.set_password(self.form.cleaned_data['password'])
|
||||
user.needs_password_change = False
|
||||
user.save()
|
||||
messages.success(request, _('You can now login using your new password.'))
|
||||
user.log_action('pretix.control.auth.user.forgot_password.recovered')
|
||||
|
||||
Reference in New Issue
Block a user