Hello,
I would like to use the parameter “username” with custom_profile_data in the Member module, like this:
{exp:member:custom_profile_data username=”{segment_3}”}
Read all the data you like.
{/exp:member:custom_profile_data}To make this work I did the following core hack:
Create parameter fetch of $username
$member_id = ( ! $this->EE->TMPL->fetch_param('member_id')) ?
$this->EE->session->userdata('member_id') :
$this->EE->TMPL->fetch_param('member_id');
$username = ( ! $this->EE->TMPL->fetch_param('username')) ?
'' :
$this->EE->TMPL->fetch_param('username');Create where clausule for $username
$this->EE->db->from(array('members m', 'member_groups g'));
if ($username=='')
{
$this->EE->db->where('m.member_id', $member_id);
} else {
$this->EE->db->where('m.username', $username); // should be safe for wildcards
}
$this->EE->db->where('g.site_id', $this->EE->config->item('site_id'));
$this->EE->db->where('m.group_id = g.group_id');
$query = $this->EE->db->get();I hope this is the right place to post this. It’s probably a Feature Request.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.