Topic: Hide usergroup
Is there anyway to hide usergroups (in the userlist) to users and moderators?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → Hide usergroup
Is there anyway to hide usergroups (in the userlist) to users and moderators?
Edit the code that builds the dropdown?
Yes, sorry, I meant natively supported. I believe it's a no, hence I'll edit the code.
Thanks for confirming.
How would I do this?
Here's what I've done.
Note: line numbers might not match with the default userlist.php
Open userlist.php
line 67: <?php endif; ?> <label class="conl"><?php echo $lang_ul['User group']."\n" ?>
Change to
<?php endif;
if($pun_user['g_id'] == 1)
{
?>
<label class="conl"><?php echo $lang_ul['User group']."\n" ?>
Go to line 84: <br /></label>
Add after:
<?php
}
?>
This will show the usergroup dropdown menu to admins only.
Note: this will only hide the usergroup dropdown menu, it will be still possible to browse the usergroups by entering the query in the url but probably most of the users won't bother doing it.
thanks stofanto. I had removed the link from the top and someone started pasting the link on the boards. I had to use the other one (from that other thread) to remove their view. Problem is it keeps mods from seeing it also
Right, so instead of
if($pun_user['g_id'] == 1)
Put this
if($pun_user['g_id'] == 1 || $pun_user['g_id'] == 2)
But I used this one!
if ($pun_user['g_read_board'] == '0')
message($lang_common['No view']);
and should be:
if ($pun_user['g_read_board'] == '0')
message($lang_common['No view']);
else if ($pun_user['g_search_users'] == '0')
message($lang_search['No search permission']);
PunBB Forums → PunBB 1.2 troubleshooting → Hide usergroup
Powered by PunBB, supported by Informer Technologies, Inc.