1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Do not display COPPA group in memberlist find member dialog if COPPA disabled (Bug #37175)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9075 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2008-11-22 18:13:18 +00:00
parent 3d9eb90d72
commit 127750f89d
2 changed files with 21 additions and 4 deletions

View File

@@ -1276,11 +1276,21 @@ switch ($mode)
$s_group_select = '<option value="0"' . ((!$group_selected) ? ' selected="selected"' : '') . '>&nbsp;</option>';
$group_ids = array();
/**
* @todo add this to a separate function (function is responsible for returning the groups the user is able to see based on the users group membership)
*/
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
$sql = 'SELECT group_id, group_name, group_type
FROM ' . GROUPS_TABLE . '
ORDER BY group_name ASC';
FROM ' . GROUPS_TABLE;
if (!$config['coppa_enable'])
{
$sql .= " WHERE group_name <> 'REGISTERED_COPPA'";
}
$sql .= ' ORDER BY group_name ASC';
}
else
{
@@ -1292,8 +1302,14 @@ switch ($mode)
AND ug.user_id = ' . $user->data['user_id'] . '
AND ug.user_pending = 0
)
WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
ORDER BY g.group_name ASC';
WHERE (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')';
if (!$config['coppa_enable'])
{
$sql .= " WHERE group_name <> 'REGISTERED_COPPA'";
}
$sql .= ' ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);