我正在joomla 3.0中创建一个模块,它将显示所有在线用户的列表。但我不知道当任何用户上网时,哪个数据库表中的状态会发生变化。如果有人能帮忙的话。
提前感谢
在Joomla 3.2.0:中
请参阅文件:wwwroot''joomla3.1''administrator''modules''mod_status''mod_status.php(在线:56您将看到sql来获取前端登录用户的数量)
// 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.
您可以轻松修改Who's Online模块并获得所需的数据
你管链接