Every where I look for 'checking if user is logged in' directs me to checking if the currently logged in user is logged in. If I have a list of friends, and I want to see who in that list is logged in. How can I check that?
I've tried 'user.is_authenticated()' on the friends, but it always comes back as 'True'??
You can get this data from sessions table.
Check this question How to get the list of the authenticated users?