UBB.Dev
Posted By: Dalantech [6.2.x] Locking down who's online - 03/21/2003 2:16 AM
NAME: Locking down Who's Online
VERSION: 1.0.0
DESCRIPTION: Restricts the who's online page to registered users only.
WORKING UNDER: UBB.threads 6.2.3
PREREQUISITES: none
AUTHORS: Dalantech
CREDITS:
DEMO: Who's Online at Da Forum. If you are not registered you'll see an error page.
FILES ALTERED: online.php
DATABASE ALTERED: no
NEW FILES: None.
HISTORY: Initial release.

Backup your online.php file first!

In online.php look for:

Code
<br />// Get the user info<br />   $userob = new user;<br />   $user = $userob -> authenticate("U_TimeOffset,U_Groups"); 


and under it ADD:

Code
<br />   $Username = $user['U_Username'];<br /><br />// Block if Not Logged in<br />if (!$Username) {<br />   $html = new html;<br />   $html -> not_right('You must <a href="login.php">Login</a> or <a href="newuser.php">Register a Username</a> To use the Who is Online display.',$Cat);<br />}   


Save and upload the online.php file to your Threads directory.
Posted By: AKD96 Re: [6.2.x] Locking down who's online - 03/23/2003 7:54 PM
Works like a charm. Thanks!
Posted By: Dalantech Re: [6.2.x] Locking down who's online - 03/24/2003 7:19 AM
Glad you like it
Posted By: Dave_L_dup1 Re: [6.2.x] Locking down who's online - 03/25/2003 1:06 AM
If you wanted to simplify this slightly, you could get rid of the first line, and change the "if" to:

if (!$user['U_Username']) {
Posted By: Dalantech Re: [6.2.x] Locking down who's online - 03/25/2003 7:32 AM
Thanks!
Posted By: Dalantech Re: [6.2.x] Locking down who's online - 03/28/2003 4:02 PM
Lisa P posted a mod for 6.0.2 to lock down who's online that I didn't even see until today. Her version blocks people who have set themselves to invisible, and it may work for Threads 6.2.x (but I haven't tried it yet). Good job!
Posted By: AKD96 Re: [6.2.x] Locking down who's online - 03/28/2003 5:39 PM
JustDave has this feature on IIP.

[]If a user a user is invisible should we allow them to see others that are not?
Note: Admins are not affected by this setting.[/]

But I guess it really defeats the purpose if it only affects the PAL box.
Posted By: Dalantech Re: [6.2.x] Locking down who's online - 03/30/2003 9:43 PM
I haven't modified the PAL box to only allow registered users to see it... yet...
© UBB.Developers