View Full Version : Banned Users on "Currently Active Users"
MattGarner
05-29-2013, 04:05 PM
Hi all,
I've done a search but the stuff that gets mentioned doesn't seem to be doing the trick. I am wondering if there is a way to basically hide banned users from showing up on the currently active users. Anyone have any ideas?
Cheers,
John Lester
05-29-2013, 08:44 PM
Edit includes/functions_databuild.php
Search for (occurs twice):
usergroupid NOT IN (3,4);
Replace with:
usergroupid NOT IN (3,4,8);
Find next and repeat. You can add other user groups (by usergroup id #) if you wish just follow the format between the ()'s and you should be good to go :)
MattGarner
06-09-2013, 09:41 AM
Edit includes/functions_databuild.php
Search for (occurs twice):
usergroupid NOT IN (3,4);
Replace with:
usergroupid NOT IN (3,4,8);
Find next and repeat. You can add other user groups (by usergroup id #) if you wish just follow the format between the ()'s and you should be good to go :)
That didn't seem to do anything :(
It won't take effect until something causes the user stats to be rebuilt. One way to force it would be to manually run the "Daily Statistics Log" scheduled task.
John Lester
06-09-2013, 06:24 PM
It won't take effect until something causes the user stats to be rebuilt. One way to force it would be to manually run the "Daily Statistics Log" scheduled task.
Oh crap, yea I forgot to mention that it wouldn't change until someone registers, or you create a new member, or delete a member. Sorry :p
Bow Walker
06-11-2013, 06:04 PM
I would also like to be able to have the 'banned' users not appear in the 'Current Active Users'.
But - being a total neophyte as far as php code is concerned - I'd appreciate being directed to where I can insert the user id of the banned members, thus causing them to be invisible to registered members browsing my forum.
Thank you in advance for any help.
Well, John Lester pretty much summed it up in post #2: you need to get a copy of the file includes/functions_databuild.php on your local computer (either get it from the vb distribution, or download it via ftp from your server). If you download it from your server, make a copy of it on your computer so that you save the original. This way if something goes wrong with the changes, you should just be able to upload the unchanged file to fix it. If you're using the one from the vb distribution, make a copy of it before editing it.
Next you need to edit the file using a programming editor (or use notepad if you don't have anything else - don't use Word or wordpad or other word processing editor). Find this:
usergroupid NOT IN (3,4)
which is in two places: one is on a line by itself, the other is near the end of a long line. In both places you want to add 8 to the list, so it looks like this:
usergroupid NOT IN (3,4,8)
Then save it and use ftp to upload it to your server, in the includes directory, overwriting the existing file.
John Lester
06-12-2013, 05:30 PM
There is no place to enter a userid, you can only do this by usergroupid. If you want specific individuals to not show up, but don't want them banned you will have to create a user group just for them and add the usergroupid as explained earlier in the thread.
There is no place to enter a userid, ...
Oh right. Obviously I thought he meant usergroupid. :o
MattGarner
06-17-2013, 04:27 PM
It won't take effect until something causes the user stats to be rebuilt. One way to force it would be to manually run the "Daily Statistics Log" scheduled task.
Oh crap, yea I forgot to mention that it wouldn't change until someone registers, or you create a new member, or delete a member. Sorry :p
Even after that being done manually or a user has joined up recently, they are still showing up.
John Lester
06-17-2013, 11:24 PM
Are you sure you found both instances of the code and made the change to each instance? Also, did you input the proper user group id?
If you would post the two bits of code we can look it over and see if there's a mistake.
Terrablade
11-07-2013, 09:00 PM
No such thing as usergroupid NOT IN (3,4); in vb 3.8.7. pl3
I cant find none of that to modify... is it different?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.