Revision 789a5951 snf-astakos-app/astakos/im/forms.py
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
293 | 293 |
if self.instance: |
294 | 294 |
if self.instance.email == email: |
295 | 295 |
raise forms.ValidationError(_("This is your current email.")) |
296 |
for user in AstakosUser.objects.filter(email=email): |
|
296 |
for user in AstakosUser.objects.filter(email__iexact=email):
|
|
297 | 297 |
if user.provider == 'shibboleth': |
298 | 298 |
raise forms.ValidationError(_( |
299 | 299 |
"This email is already associated with another \ |
... | ... | |
452 | 452 |
def clean_email(self): |
453 | 453 |
email = super(ExtendedPasswordResetForm, self).clean_email() |
454 | 454 |
try: |
455 |
user = AstakosUser.objects.get(email=email, is_active=True) |
|
455 |
user = AstakosUser.objects.get(email__iexact=email, is_active=True)
|
|
456 | 456 |
if not user.has_usable_password(): |
457 | 457 |
raise forms.ValidationError(_(astakos_messages.UNUSABLE_PASSWORD)) |
458 | 458 |
except AstakosUser.DoesNotExist: |
Also available in: Unified diff