Added 'Forgot Password' function.
This commit is contained in:
@@ -62,3 +62,15 @@ class SetPasswordForm(forms.Form):
|
||||
if commit:
|
||||
self.user.save()
|
||||
return self.user
|
||||
|
||||
|
||||
class ResetPasswordForm(forms.Form):
|
||||
username = auth_forms.UsernameField(
|
||||
max_length=254,
|
||||
label=_(u'E-Mail-Adresse'),
|
||||
widget=forms.TextInput(attrs={'autofocus': True}),
|
||||
)
|
||||
|
||||
def clean_username(self):
|
||||
username = self.cleaned_data.get('username')
|
||||
return username.lower()
|
||||
|
||||
Reference in New Issue
Block a user