From df2cde282213b23c6577a252f3d132e3ff9eee6c Mon Sep 17 00:00:00 2001 From: klonfish Date: Thu, 14 Feb 2019 21:59:27 +0100 Subject: [PATCH] Added required get_user function to UsernameCardnumberPinBackend --- cashonly/core/auth.py | 6 ++++++ 1 file changed, 6 insertions(+) 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