Oh yes, you bet. Sorry.
IPS removes guests from the widgets. Example:
- in the widget:
$members = \IPS\Session\Store::i()->getOnlineMembersByLocation( \IPS\Dispatcher::i()->application->directory, \IPS\Dispatcher::i()->module->key, \IPS\Dispatcher::i()->controller, \IPS\Request::i()->id, $url );
And the method:
public function getOnlineMembersByLocation( $app, $module, $controller, $id, $url )
{
$members = array();
$where = array(
array( 'core_sessions.login_type=' . \IPS\Session\Front::LOGIN_TYPE_MEMBER ),
array( 'core_sessions.current_appcomponent=?', $app ),
array( 'core_sessions.current_module=?', $module ),
array( 'core_sessions.current_controller=?', $controller ),
array( 'core_sessions.running_time>' . \IPS\DateTime::create()->sub( new \DateInterval( 'PT30M' ) )->getTimeStamp() ),
array( 'core_sessions.location_url IS NOT NULL AND location_url LIKE ?', "{$url}%" ),
array( 'core_sessions.member_id IS NOT NULL' )
);
if( $id )
{
$where[] = array( 'core_sessions.current_id = ?', \IPS\Request::i()->id );
}
foreach( \IPS\Db::i()->select( 'core_sessions.member_id,core_sessions.member_name,core_sessions.seo_name,core_sessions.member_group,core_sessions.login_type,core_sessions.in_editor', 'core_sessions', $where, 'core_sessions.running_time DESC' ) as $row )
{
if( $row['login_type'] == \IPS\Session\Front::LOGIN_TYPE_MEMBER and $row['member_name'] )
{
$members[ $row['member_id'] ] = $row;
}
}
return $members;
}
It checks twice if it's a member. Guests are excluded.