mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/12392] Include $profile_fields in core.memberlist_view_profile
PHPBB3-12392
This commit is contained in:
parent
1dd02b0a91
commit
48cc7961d4
1 changed files with 17 additions and 19 deletions
|
@ -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'))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue