Invisible users show for all and not just admins. The fix is as follows:
Find:
PHP Code:
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if ($todayuser['invisible']==1) and ($bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible']==1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
Replace with:
PHP Code:
$todayusers=$DB_site->query("SELECT userid,(user.options & $_USEROPTIONS[invisible]) AS invisible, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']!=6)) {
$numbertodayonlineinvisible++;
continue;
}
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']==6)) { // Invisible User but show to Admin
$invisibleuser = '*';
}
-----------
In case my copying and pasting are screwy, what needs to be fixed is the query. It needs to check the options field in the table. invisible was a vb2 field and isn't in vb3. It also needs to change the if statements because invisible will not equal 1. It just won't equal zero.
I also moved the templates to the cache on my board, but didn't bother with the phrases. Things seem to be working ok now.
Amy