Revision 4bdd7e3d snf-astakos-app/astakos/im/forms.py
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
359 | 359 |
'recaptcha_response_field', ]) |
360 | 360 |
|
361 | 361 |
def clean_username(self): |
362 |
if 'username' in self.cleaned_data: |
|
363 |
return self.cleaned_data['username'].lower() |
|
362 |
return self.cleaned_data['username'].lower() |
|
364 | 363 |
|
365 | 364 |
def clean_recaptcha_response_field(self): |
366 | 365 |
if 'recaptcha_challenge_field' in self.cleaned_data: |
... | ... | |
475 | 474 |
def clean_email(self): |
476 | 475 |
email = super(ExtendedPasswordResetForm, self).clean_email() |
477 | 476 |
try: |
478 |
user = AstakosUser.objects.get(email__iexact=email, is_active=True)
|
|
477 |
user = AstakosUser.objects.get(email__iexact=email) |
|
479 | 478 |
if not user.has_usable_password(): |
480 | 479 |
raise forms.ValidationError(_(astakos_messages.UNUSABLE_PASSWORD)) |
481 | 480 |
|
Also available in: Unified diff