aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2015-09-23 18:54:46 +0200
committerJakub Senko <jakubsenko@gmail.com>2015-10-12 16:40:45 +0200
commit66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0 (patch)
tree0d7f0037d99b8fdb2d9945e23cfe46f4ac70897b /phpBB
parent7e379c4cea5452dad81adbc508b205badf49d25f (diff)
downloadforums-66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0.tar
forums-66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0.tar.gz
forums-66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0.tar.bz2
forums-66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0.tar.xz
forums-66ee80c9e2e0ed168ff019bae0b0f4f7d5d650f0.zip
[ticket/14192] Add core.memberlist_memberrow_before event
PHPBB3-14192
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/memberlist.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index e64dab635b..af86af4d73 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1448,6 +1448,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];
@@ -1458,7 +1472,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(