LPH
Well-known member
Outside of XenForo 2, the
This is the code that I'm using.
Pulling the
Am I doing something wrong in my reasoning? Should I try to use something else besides the repository?
getOnlineUsersList
is pulled. If the user logins to XenForo from outside XF 2 and hasn't browsed then the repository isn't showing that the user is in fact logged into the site. Once the account browses to XenForo 2 installation then the getOnlineUsersList
is updated to show the user.This is the code that I'm using.
PHP:
/** @var \XF\Repository\SessionActivity $activityRepo */
$activityRepo = \XF::app()->repository('XF:SessionActivity');
$onlineCount = $activityRepo->getOnlineCounts();
$onlineUserList = $activityRepo->getOnlineUsersList(50);
Pulling the
SessionActivity
in XenForo 1 worked fine; that is, once the person logged in then they were shown on the list. They never had to browse to the XF installation. Am I doing something wrong in my reasoning? Should I try to use something else besides the repository?