aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPayBas <contact@paybas.com>2014-04-12 12:38:35 +0200
committerPayBas <contact@paybas.com>2014-05-02 17:59:43 +0200
commit48cc7961d4d6ac0dc7c1da220100a2922033d637 (patch)
tree7da6265d35cf04f2c103d171f3826a865b25157a /phpBB
parent1dd02b0a916f1cd7672ffc247f09c9b6d4598d7c (diff)
downloadforums-48cc7961d4d6ac0dc7c1da220100a2922033d637.tar
forums-48cc7961d4d6ac0dc7c1da220100a2922033d637.tar.gz
forums-48cc7961d4d6ac0dc7c1da220100a2922033d637.tar.bz2
forums-48cc7961d4d6ac0dc7c1da220100a2922033d637.tar.xz
forums-48cc7961d4d6ac0dc7c1da220100a2922033d637.zip
[ticket/12392] Include $profile_fields in core.memberlist_view_profile
PHPBB3-12392
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/memberlist.php36
1 files changed, 17 insertions, 19 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 9c6b3d278f..631a83be85 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -584,25 +584,31 @@ switch ($mode)
unset($module);
}
+ // Custom Profile Fields
+ $profile_fields = array();
+ if ($config['load_cpf_viewprofile'])
+ {
+ $cp = $phpbb_container->get('profilefields.manager');
+ $profile_fields = $cp->grab_profile_fields_data($user_id);
+ $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array();
+ }
+
/**
* Modify user data before we display the profile
*
* @event core.memberlist_view_profile
* @var array member Array with user's data
- * @var bool user_notes_enabled Is the mcp user notes module
- * enabled?
- * @var bool warn_user_enabled Is the mcp warnings module
- * enabled?
- * @var bool zebra_enabled Is the ucp zebra module
- * enabled?
- * @var bool friends_enabled Is the ucp friends module
- * enabled?
- * @var bool foes_enabled Is the ucp foes module
- * enabled?
+ * @var bool user_notes_enabled Is the mcp user notes module enabled?
+ * @var bool warn_user_enabled Is the mcp warnings module enabled?
+ * @var bool zebra_enabled Is the ucp zebra module enabled?
+ * @var bool friends_enabled Is the ucp friends module enabled?
+ * @var bool foes_enabled Is the ucp foes module enabled?
* @var bool friend Is the user friend?
* @var bool foe Is the user foe?
+ * @var array profile_fields Array with user's profile field data
* @since 3.1.0-a1
* @changed 3.1.0-b2 Added friend and foe status
+ * @changed 3.1.0-b3 Added profile fields data
*/
$vars = array(
'member',
@@ -613,20 +619,12 @@ switch ($mode)
'foes_enabled',
'friend',
'foe',
+ 'profile_fields',
);
extract($phpbb_dispatcher->trigger_event('core.memberlist_view_profile', compact($vars)));
$template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled));
- // Custom Profile Fields
- $profile_fields = array();
- if ($config['load_cpf_viewprofile'])
- {
- $cp = $phpbb_container->get('profilefields.manager');
- $profile_fields = $cp->grab_profile_fields_data($user_id);
- $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array();
- }
-
// If the user has m_approve permission or a_user permission, then list then display unapproved posts
if ($auth->acl_getf_global('m_approve') || $auth->acl_get('a_user'))
{