mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 09:06:40 +03:00
Merge pull request #171 from Akay7/CanLoginWithCustomUserModel
update for accept login users of CustomUserModel objects where doesn'…
This commit is contained in:
commit
c282a1309e
|
@ -81,7 +81,7 @@ class LoginSerializer(serializers.Serializer):
|
||||||
# Authentication without using allauth
|
# Authentication without using allauth
|
||||||
if email:
|
if email:
|
||||||
try:
|
try:
|
||||||
username = UserModel.objects.get(email__iexact=email).username
|
username = UserModel.objects.get(email__iexact=email).get_username()
|
||||||
except UserModel.DoesNotExist:
|
except UserModel.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user