Set token user to allow ownership creation

This commit is contained in:
Adarnof 2017-12-22 12:20:55 -05:00
parent 0cf8836832
commit 1101572f78

View File

@ -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: