mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-25 10:33:45 +03:00
fix #539 where user.is_active was ignored for social login
This commit is contained in:
parent
624ad01afb
commit
b3c91dfda7
|
@ -142,6 +142,9 @@ class SocialLoginSerializer(serializers.Serializer):
|
|||
login.lookup()
|
||||
login.save(request, connect=True)
|
||||
|
||||
if not login.user.is_active:
|
||||
raise serializers.ValidationError(_('User account is disabled.'))
|
||||
|
||||
attrs['user'] = login.account.user
|
||||
|
||||
return attrs
|
||||
|
|
Loading…
Reference in New Issue
Block a user