j2k4b wrote:I logged out of my board and cleared cookies and stuff. The userlist link isn't on my board but if I type in the domain (ie: http://www.domain.com/punbb/userlist.php) then the userlist will come up. I want it disabled for view unless you are logged in.
This is something I've been doing for a while, a manual hack to the functions.php and userlist.php which stops the user list menu item being shown or the userlist.php page being opened when manualy entered in the address bar.
The code looks like this.....
in functions.php to prevent the menu item apearing....
//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
global $pun_config, $lang_common, $pun_user;
// Index and Userlist should always be displayed
$links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
// Confirm the User has authenticated defore displaying menu option.
if ($pun_user['is_guest'] == '0')
$links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';
if ($pun_config['o_rules'] == '1')
$links[] = '<li id="navrules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';
.
.
.
etc.
And then in the userlist.php....to prevent a typed url being used....
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
if ($pun_user['g_read_board'] == '0')
message($lang_common['No view']);
// Verify the user has authenticated and display Permission Error if not.
if ($pun_user['is_guest'] == '1')
message($lang_common['No permission']);
else
{
// Load the userlist.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/userlist.php';
// Load the search.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';
.
.
.
etc.
<?php
}
require PUN_ROOT.'footer.php'
If you want to enter the code i'd suggest searching for some of the surrounding text to get you to the right place first.
It works for me and if anyone has the time to make it into a full blown mod then got for it....