Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-7624 now.

viewprofile list of groups (in memberlist.php) wrongly conceals hidden groups of which the viewer is (fix completed in vcs)

I just noticed that when a user looks at the list of member groups in someone's profile, he will generally not see hidden groups even if the user who is doing the looking is a member of the hidden group. I assume the list should actually include hidden groups of which the viewing user is a member, correct?

The problem is in this code in memberlist.php:

Code: Select all
      // Do the SQL thang
      $sql = 'SELECT g.group_id, g.group_name, g.group_type
         FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
         WHERE ug.user_id = $user_id
            AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
            AND ug.user_pending = 0
         ORDER BY g.group_type, g.group_name';
      $result = $db->sql_query($sql);

This looks like a bug to me, but perhaps you intended it because getting it to list the hidden groups the viewer is a member of might take an extra query or at least a query that takes longer to execute?

Comments / History

Posted by asinshesq (QA Team) on Oct 13th 2009, 14:59

I'm not sure of the protocol here about bumping tickets, but at the risk of violating that protocol I am bumping this ticket that I submitted 14 months ago.

Posted by narqelion (I've Been Banned!) on Oct 14th 2009, 17:27

Posted by asinshesq (QA Team) on Oct 14th 2009, 17:45

Thanks, nargelion. Glad to see DavidIQ raised this issue as well. So I guess one of these bugs should get marked as a duplicate.

Edited post #191805

Action performed by asinshesq (QA Team) on Oct 14th 2009, 17:45

Posted by nasadows on Oct 20th 2009, 17:38

I have the same problem as well, but this time NOT (ONLY) with the Memberlist Profile, but with a MOD that takes the code from that file (memberlist.php)

Here is the link to the Mod & the problem:
"User's Group membership list with Color in Viewtopic"
viewtopic.php?f=72&t=1786185&start=60#p11041885
(currently cannot display Hidden Groups in the list for the normal user to see because of this)

Assigned ticket to user "bantu"

Action performed by bantu (3.0 Release Manager) on Oct 20th 2009, 21:16

Changed ticket status from "New" to "Reviewed"

Action performed by bantu (3.0 Release Manager) on Oct 20th 2009, 21:16

Marked ticket #52235 as duplicate of this ticket

Action performed by bantu (3.0 Release Manager) on Dec 28th 2009, 00:34

Changed ticket status from "Reviewed" to "Fix in progress"

Action performed by bantu (3.0 Release Manager) on Dec 29th 2009, 14:16

Linked ticket with changeset: r10392

Action performed by bantu (3.0 Release Manager) on Dec 31st 2009, 16:31

Changed ticket status from "Fix in progress" to "Fix completed in SVN"

Action performed by bantu (3.0 Release Manager) on Dec 31st 2009, 16:36

Linked ticket with changeset: r10393

Action performed by bantu (3.0 Release Manager) on Dec 31st 2009, 17:07

Ticket details

Duplicates of this ticket

Related SVN changesets