sandeep soni
sandeep soni

Reputation: 303

Count online user in joomla 3.0

I am creating a module in joomla 3.0 which will show the list of all online users. but i have no idea that in which database table the status change when any user get online. if any one can help please.

Thanks in advance

Upvotes: 3

Views: 756

Answers (2)

PHPJungle
PHPJungle

Reputation: 522

In Joomla 3.2.0:

see file :wwwroot\joomla3.1\administrator\modules\mod_status\mod_status.php (on line:56 you will see the sql to Get the number of frontend logged in users )

// Get the number of frontend logged in users.
   $query->clear()
         ->select('COUNT(session_id)')
         ->from('#__session')
         ->where('guest = 0 AND client_id = 0');

   $db->setQuery($query);
   $online_num = (int) $db->loadResult(); # Get the number of frontend logged in users.

Upvotes: 3

Damith
Damith

Reputation: 114

You can easily modify Who’s Online module and get the required data

You tube link

Upvotes: 1

Related Questions