aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-02-25 15:47:34 +0100
committerJoas Schilling <nickvergessen@gmx.de>2011-02-25 15:47:34 +0100
commit4ac8eaf9e3421f394136dc722542198b3048f4f8 (patch)
tree059ef770220f774d12a321bf571306cd5abbed2f
parentfd7daf2a2b04463deb07b350ffb99d2c99e982c4 (diff)
downloadforums-4ac8eaf9e3421f394136dc722542198b3048f4f8.tar
forums-4ac8eaf9e3421f394136dc722542198b3048f4f8.tar.gz
forums-4ac8eaf9e3421f394136dc722542198b3048f4f8.tar.bz2
forums-4ac8eaf9e3421f394136dc722542198b3048f4f8.tar.xz
forums-4ac8eaf9e3421f394136dc722542198b3048f4f8.zip
[ticket/9549] Display users in their primary group instead of their first group
PHPBB3-9549
-rw-r--r--phpBB/language/en/acp/groups.php2
-rw-r--r--phpBB/memberlist.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index eb83dec576..11342bf4f2 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -133,7 +133,7 @@ $lang = array_merge($lang, array(
'TEAMPAGE_FORUMS' => 'Display moderated forums',
'TEAMPAGE_FORUMS_EXPLAIN' => 'If set to yes, moderators will have a list with all of the forums where they have moderator permissions displayed in their row. This can be very database intensive for big boards.',
'TEAMPAGE_MULTIPLE' => 'Display users in all groups',
- 'TEAMPAGE_MULTIPLE_EXPLAIN' => 'If set to no, the users will only be displayed in their first group.',
+ 'TEAMPAGE_MULTIPLE_EXPLAIN' => 'If set to no, the users will only be displayed in their primary group (If the primary group is not listed, the users will be displayed in their first displayed group).',
'TEAMPAGE_SETTINGS' => 'Teampage settings',
'TOTAL_MEMBERS' => 'Members',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index f417215dab..06212c2d77 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -229,6 +229,11 @@ switch ($mode)
if (isset($user_ary[$user_id]))
{
$row = $user_ary[$user_id];
+ if (!$config['teampage_multiple'] && ($group_id != $groups_ary[$row['default_group']]['group_id']) && $groups_ary[$row['default_group']]['group_teampage'])
+ {
+ // Display users in their primary group, instead of the first group, when it is displayed on the teampage.
+ continue;
+ }
$rank_title = $rank_img = $rank_img_src = '';
get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);