mirror of
https://github.com/etesync/server
synced 2024-12-27 09:48:24 +00:00
Login: make case insensitive.
This commit is contained in:
parent
4dbdb3d7cf
commit
7b8b0a5685
@ -654,7 +654,7 @@ class AuthenticationViewSet(viewsets.ViewSet):
|
|||||||
return Response(data, status=status.HTTP_201_CREATED)
|
return Response(data, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
def get_login_user(self, username):
|
def get_login_user(self, username):
|
||||||
kwargs = {User.USERNAME_FIELD: username.lower()}
|
kwargs = {User.USERNAME_FIELD + '__iexact': username.lower()}
|
||||||
try:
|
try:
|
||||||
user = self.get_queryset().get(**kwargs)
|
user = self.get_queryset().get(**kwargs)
|
||||||
if not hasattr(user, 'userinfo'):
|
if not hasattr(user, 'userinfo'):
|
||||||
|
Loading…
Reference in New Issue
Block a user