Fix backend
This commit is contained in:
parent
99e84f04ad
commit
1c9ecb5eb9
1 changed files with 8 additions and 1 deletions
|
@ -168,3 +168,10 @@ class OldCASBackend:
|
||||||
# Taken from Django's ModelBackend
|
# Taken from Django's ModelBackend
|
||||||
is_active = getattr(user, "is_active", None)
|
is_active = getattr(user, "is_active", None)
|
||||||
return is_active or is_active is None
|
return is_active or is_active is None
|
||||||
|
|
||||||
|
# Django boilerplate.
|
||||||
|
def get_user(self, user_id):
|
||||||
|
try:
|
||||||
|
return UserModel.objects.get(pk=user_id)
|
||||||
|
except UserModel.DoesNotExist:
|
||||||
|
return None
|
||||||
|
|
Loading…
Reference in a new issue