benedmunds / CodeIgniter-Ion-Auth

Simple and Lightweight Auth System for CodeIgniter
http://benedmunds.com/ion_auth/
MIT License
2.34k stars 1.14k forks source link

The number of logged in users or even the list of logged in #1556

Closed fofopp closed 2 years ago

fofopp commented 2 years ago

The number of logged in users or even the list of logged in.

Is it possible to extract this information from IonAuth?

benedmunds commented 2 years ago

Ion Auth doesn’t have a way to do that built in, it’s almost impossible to know since users will close the browser without logging out. You could probably use CI’s table based sessions and approximate who is logged in. Or write a date time to the users table on each user activity throughout the site, then have logic to only count recent activity as active.