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: