mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-06-06 14:03:12 +03:00
Merge 8f16c5ddc7
into cdd04aa9be
This commit is contained in:
commit
d3930973d0
|
@ -94,7 +94,8 @@ class LoginSerializer(serializers.Serializer):
|
|||
|
||||
# Did we get back an active user?
|
||||
if user:
|
||||
if not user.is_active:
|
||||
# Raises error only if user is deactivated and inactive user login is disabled
|
||||
if not user.is_active and not getattr(settings, 'REST_INACTIVE_USER_LOGIN', False):
|
||||
msg = _('User account is disabled.')
|
||||
raise exceptions.ValidationError(msg)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user