MyBB Community Forums

Full Version: Change who's online (invisible and guests)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi i want to know how i can remove guests and users who have set to hide from who's online list don't appear in the who's online list

[Image: 381b376b8380c395acf184c0368f1559.png]

Here as you can see in this screenshot there are 2 admins online, 1 invisible user and 1 guest. I want the guest user and invisible user to be gone from the registered user list. so it would say: Registered users online: 2 (even if they are one guest and invisible)
For removing anonymous users, remove the rights from the user group to see anonymous users.

As for the actual count, to remove anonymous users, open up /index.php

Find
$onlinecount = $membercount + $guestcount + $botcount;

Replace with
$onlinecount = $membercount - $anoncount + $botcount;

If you want to also remove the bots in the count, change to
$onlinecount = $membercount - $anoncount;

To keep the changes after an upgrade, you might have to do this again -- or get a plugin for this.