Used Django's token generator for passwort resets

This commit is contained in:
Raphael Michel
2015-09-29 00:59:33 +02:00
parent 082e43321c
commit 264c1e034f
3 changed files with 13 additions and 33 deletions

View File

@@ -147,9 +147,7 @@ class PasswordForgotForm(forms.Form):
def clean_email(self):
email = self.cleaned_data['email']
try:
self.cleaned_data['user'] = User.objects.get(
email=email, event__isnull=True
)
self.cleaned_data['user'] = User.objects.get(email=email)
return email
except User.DoesNotExist:
raise forms.ValidationError(