well, seems that 

if ($pun_user['g_read_board'] != '0') $permitted = 1;

is executed before, so you need to combine it with

$pun_user['g_view_users'] != '0'

also there is part
  $pun_user['id'] != $id
it means - you can view your own profile, but not others. I don't know how to get this in new version, so just experiment a bit, could be the same.

So as i understand, in new version by default it is not permitted to view, so it could be something like this

if ($pun_user['g_read_board'] != '0' && ($pun_user['g_view_users'] != '0' || $pun_user['id'] == $id)) $permitted = 1;


If it works, could you please modify the notes, and post them here, as i dont have this version, and am quite busy right now.

j2k4b wrote:

I love the mod but there is one issue that I can find. I hope there is a fix for it. I disabled the userlist for Guests.

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 supposed to be done by this mod.

I suppose, you already disabled userlist access for guest group:

Administration -> User Groups -> Edit Guest -> View user list = No

You could check the following:

In userlist.php, line 30 should be

if ($pun_user['g_read_board'] == '0' || $pun_user['g_view_users'] == '0')

##
##
##        Mod title:  Userlist Access
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.10
##     Release date:  2005-11-16
##           Author:  Atis Lezdins (atis@best.eu.org)
##
##      Description:  This mod allows to forbid seeing userlist and profiles
##                    for certain groups.
##
##   Affected files:  userlist.php
##                    profile.php
##                    admin_groups.php
##                    include/functions.php
##
##       Affects DB:  Yes
##
##            Notes:  This mod allows to forbid certaing group to see the
##                    user lists and profiles. As well - the 'user list'
##                    is hidden from main menu if unaccessible
##                    This is my first mod, so i might miss something, but it
##                    works for me right now ;-)
##                    Also there are .diff files included in this package
##                    and you are encouraged to use them instead of step-by-step
##                    changing of files.
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download: http://www.punres.org/download.php?id=482

Rickard wrote:

I'm considering adding to PunBB 1.3. Group permissions for viewing the user list and user profiles.

I just wrote a mod for such functionality.

http://www.punres.org/viewtopic.php?id=822

You are welcome to include it in next release as well ;-)

You might be interested to install this mod i just wrote..

http://www.punres.org/viewtopic.php?id=822