Revision 2c6bc262 snf-astakos-app/astakos/im/forms.py
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
410 | 410 |
try: |
411 | 411 |
user = AstakosUser.objects.get_by_identifier(email) |
412 | 412 |
self.users_cache = [user] |
413 |
if not user.has_auth_provider('local', auth_backend='astakos'): |
|
414 |
provider = auth_providers.get_provider('local', user) |
|
415 |
msg = mark_safe(provider.get_unusable_password_msg) |
|
416 |
raise forms.ValidationError(msg) |
|
417 |
|
|
418 | 413 |
if not user.is_active: |
414 |
if not user.has_auth_provider('local', auth_backend='astakos'): |
|
415 |
provider = auth_providers.get_provider('local', user) |
|
416 |
msg = mark_safe(provider.get_unusable_password_msg) |
|
417 |
raise forms.ValidationError(msg) |
|
418 |
|
|
419 | 419 |
msg = mark_safe(user.get_inactive_message('local')) |
420 | 420 |
raise forms.ValidationError(msg) |
421 | 421 |
|
Also available in: Unified diff