Jump to content

Function to use in frontend to get member profile fields


Go to solution Solved by Adriano Faria,

Recommended Posts

Posted

Hi is there a function or developer docs where I can check or read on how to display member profile fields? I want to display or show certain profile fields in frontend in template.

Thanks

- Allan of Nigel's Team

  • Solution
Posted

See: https://invisioncommunity.com/forums/topic/458169-using-custom-profile-fields-in-the-welcome-email/?do=findComment&comment=2827843

To get the group ID:

RMbwdEt.png

 

To get the profile field ID:

WnGeTyD.png

 

Field in the user profile:

PQ6rc8m.png

 

Example:

{{$field = \IPS\Member::loggedIn()->profileFields( \IPS\core\ProfileFields\Field::PROFILE )['core_pfieldgroups_1']['core_pfield_3'];}}
Value: {$field}

Output:

1JlM7vU.png

 

I'm not sure but *I think* there's a way to get the field by ID but I couldn't find examples.

  • 2 months later...
Posted
On 3/14/2022 at 8:36 PM, Adriano Faria said:

See: https://invisioncommunity.com/forums/topic/458169-using-custom-profile-fields-in-the-welcome-email/?do=findComment&comment=2827843

To get the group ID:

RMbwdEt.png

 

To get the profile field ID:

WnGeTyD.png

 

Field in the user profile:

PQ6rc8m.png

 

Example:

{{$field = \IPS\Member::loggedIn()->profileFields( \IPS\core\ProfileFields\Field::PROFILE )['core_pfieldgroups_1']['core_pfield_3'];}}
Value: {$field}

Output:

1JlM7vU.png

 

I'm not sure but *I think* there's a way to get the field by ID but I couldn't find examples.

Thank you @Adriano Fariawas able to figure it out.

-Allan

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...