aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-14 16:35:24 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-14 16:35:24 +0200
commitf6776c101767e3aedcbcb2fcce09c560b8960c21 (patch)
tree13042c69e4fb3b970619ff2d9da4b404b3078f7c /phpBB/memberlist.php
parentbab85da82025e0df5e12302ab95b71373b456475 (diff)
parent66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0 (diff)
downloadforums-f6776c101767e3aedcbcb2fcce09c560b8960c21.tar
forums-f6776c101767e3aedcbcb2fcce09c560b8960c21.tar.gz
forums-f6776c101767e3aedcbcb2fcce09c560b8960c21.tar.bz2
forums-f6776c101767e3aedcbcb2fcce09c560b8960c21.tar.xz
forums-f6776c101767e3aedcbcb2fcce09c560b8960c21.zip
Merge pull request #3926 from Senky/ticket/14192
[ticket/14192] Add core.memberlist_memberrow_before event * Senky/ticket/14192: [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 ea21681ba6..364a3cd523 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1499,6 +1499,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];
@@ -1509,7 +1523,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(