How do I check if a 'different' user is logged in in django?

438 views Asked by At

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'??

1

There are 1 answers

1
ndpu On BEST ANSWER

You can get this data from sessions table.

Check this question How to get the list of the authenticated users?