XF 2.2 Staff online widget vs staff online admin page

I have created a widget for staff online to show in the sidebar visible to only staff.
I used the conditional $xf.visitor.isMemberOf([3, 4, 21, 39]) to represent the 4 user groups that are considered staff
All members of the 4 user groups are ticked to "display user as staff"

The admin.php page shows all online staff
The sidebar shows different results(missing some staff) to different members.
For instance, I just refreshed both the forum as well as admin.php
admin.php = 4 staff online
forum = 1 staff online

Any help would be appreciated
 

Jeremy P

XenForo developer
Staff member
By default, the widget may omit some staff members if there are a lot of users online. See this option to get the same results as the control panel:

screenshot-zr9IhO.png

I used the conditional $xf.visitor.isMemberOf([3, 4, 21, 39]) to represent the 4 user groups that are considered staff
All members of the 4 user groups are ticked to "display user as staff"
You can probably use $xf.visitor.is_staff instead then.
 
Top