Jump to content


[PunBB]Hide userlist & profiles from guests


No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 03 February 2006 - 01:44 PM

To hide the userlist and user profiles from guests in PunBB 1.2 use this simple hack...


FIND in userlist.php:
if ($pun_user['g_read_board'] == '0')
	message($lang_common['No view']);
ADD AFTER:
//begin hide userlist from guests hack by visiblesoul
if ($pun_user['g_id'] == PUN_GUEST)
	//message($lang_common['No view']);
	message('You do not have permission to view the userlist.');
//end hide userlist hack
FIND in profile.php:
if ($pun_user['g_read_board'] == '0' && ($action != 'change_pass' || !isset($_GET['key'])))
	message($lang_common['No view']);
ADD AFTER:
//begin hide profiles from guests hack
if ($pun_user['g_id'] == PUN_GUEST)
	//message($lang_common['No view']);
	message('You do not have permission to view profiles.');
//end hide profiles hack
Of course you can also put the error text in the language file if you prefer.

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users