diff --git a/cashonly/core/auth.py b/cashonly/core/auth.py index dcf7e3f..f12f3de 100644 --- a/cashonly/core/auth.py +++ b/cashonly/core/auth.py @@ -25,3 +25,9 @@ class UsernameCardnumberPinBackend(object): if accmgr.check_pin(pin): return account.user return None + + def get_user(self, user_id): + try: + return User.objects.get(pk=user_id) + except User.DoesNotExist: + return None