• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Remove Guests From 'Online' Page

Jake Bunce

XenForo moderator
Staff member
#1
Screen shot 2011-10-06 at 2.07.02 PM.png

Edit this file:

library/XenForo/ControllerPublic/Online.php

Add the red code (don't forget the comma on the far right):

Code:
		$conditions = array(
			'cutOff' => array('>', $sessionModel->getOnlineStatusTimeout()),
			'getInvisible' => $bypassUserPrivacy,
			'getUnconfirmed' => $bypassUserPrivacy,

			// allow force including of self, even if invisible
			'forceInclude' => ($bypassUserPrivacy ? false : XenForo_Visitor::getUserId()),

			'userLimit' => 'registered'
		);

		$onlineUsers = $sessionModel->getSessionActivityRecords($conditions, array(
			'perPage' => $userPerPage,
			'page' => $page,
			'join' => XenForo_Model_Session::FETCH_USER,
			'order' => 'view_date'
		));
 

Dodgeboard

Well-known member
#3
Jake,

Sometimes I want to see guests. But I feel it's more important to see registered members.

Would you know a way to order the 'logged in' users before the 'guests'?
 

Digital Doctor

Well-known member
#4
If a site had 200 guests .... how many pages of blank guests would there be ? Is that useful ?

Current Visitors
Admin
RegisteredUserJake
Guests (3)
- viewing forum list 3 min ago.
- editing their avatar 9 min ago.
- viewing list of online members 23 min ago.