mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 17:16:34 +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.lookup()
|
||||||
login.save(request, connect=True)
|
login.save(request, connect=True)
|
||||||
|
|
||||||
|
if not login.user.is_active:
|
||||||
|
raise serializers.ValidationError(_('User account is disabled.'))
|
||||||
|
|
||||||
attrs['user'] = login.account.user
|
attrs['user'] = login.account.user
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user