Topic: Hide usergroup

Is there anyway to hide usergroups (in the userlist) to users and moderators?

Re: Hide usergroup

Edit the code that builds the dropdown?

Re: Hide usergroup

Yes, sorry, I meant natively supported. I believe it's a no, hence I'll edit the code.

Thanks for confirming.

4

Re: Hide usergroup

How would I do this?

Re: Hide usergroup

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.

6

Re: Hide usergroup

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

Re: Hide usergroup

Right, so instead of

if($pun_user['g_id'] == 1)

Put this

if($pun_user['g_id'] == 1 || $pun_user['g_id'] == 2)

8 (edited by TFD 2007-09-25 01:36)

Re: Hide usergroup

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']);