Created
August 1, 2016 21:32
-
-
Save rgegriff/f7196c63b431695df3ec5ea5610bd3f4 to your computer and use it in GitHub Desktop.
Impersonate python sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
email = "User@email.com" | |
user = User.objects.get(email__icontains=email) | |
[s for s in Session.objects.all() if "_auth_user_id" in s.get_decoded() and int(s.get_decoded()['_auth_user_id']) == user.id] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment