aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-14 16:36:52 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-14 16:36:52 +0200
commit9ac79453e12e5840f8fa06a6323fb67b132726c1 (patch)
treefc65e4d5e7122358a47d8a2f9f474efb44e8d947 /phpBB/memberlist.php
parentdf723c388a22f6cad023764ba0fb1ebc197f9855 (diff)
parentf6776c101767e3aedcbcb2fcce09c560b8960c21 (diff)
downloadforums-9ac79453e12e5840f8fa06a6323fb67b132726c1.tar
forums-9ac79453e12e5840f8fa06a6323fb67b132726c1.tar.gz
forums-9ac79453e12e5840f8fa06a6323fb67b132726c1.tar.bz2
forums-9ac79453e12e5840f8fa06a6323fb67b132726c1.tar.xz
forums-9ac79453e12e5840f8fa06a6323fb67b132726c1.zip
Merge branch '3.1.x'
* 3.1.x: [ticket/14192] Add core.memberlist_memberrow_before event
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 6fc8c5ff02..c4865ab3c2 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1502,6 +1502,20 @@ switch ($mode)
usort($user_list, 'phpbb_sort_last_active');
}
+ // do we need to display contact fields as such
+ $use_contact_fields = false;
+
+ /**
+ * Modify list of users before member row is created
+ *
+ * @event core.memberlist_memberrow_before
+ * @var array user_list Array containing list of users
+ * @var bool use_contact_fields Should we display contact fields as such?
+ * @since 3.1.7-RC1
+ */
+ $vars = array('user_list', 'use_contact_fields');
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_memberrow_before', compact($vars)));
+
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
{
$user_id = $user_list[$i];
@@ -1512,7 +1526,7 @@ switch ($mode)
$cp_row = array();
if ($config['load_cpf_memberlist'])
{
- $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
+ $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], $use_contact_fields) : array();
}
$memberrow = array_merge(phpbb_show_profile($row, false, false, false), array(