Jump to content

Function to use in frontend to get member profile fields


Go to solution Solved by Adriano Faria,

Recommended Posts

  • Solution

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.

Link to comment
Share on other sites

  • 2 months later...
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

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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