From 1101572f78c49addb08dd680547b06b4b562dcd8 Mon Sep 17 00:00:00 2001 From: Adarnof Date: Fri, 22 Dec 2017 12:20:55 -0500 Subject: [PATCH] Set token user to allow ownership creation --- allianceauth/authentication/backends.py | 1 + 1 file changed, 1 insertion(+) diff --git a/allianceauth/authentication/backends.py b/allianceauth/authentication/backends.py index 949b8682..281c7984 100644 --- a/allianceauth/authentication/backends.py +++ b/allianceauth/authentication/backends.py @@ -39,6 +39,7 @@ class StateBackend(ModelBackend): # insecure legacy main check for pre-sso registration auth installs profile = UserProfile.objects.get(main_character__character_id=token.character_id) # attach an ownership + token.user = profile.user CharacterOwnership.objects.create_by_token(token) return profile.user except UserProfile.DoesNotExist: