Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Nigel Moore Posted March 14, 2022 Posted March 14, 2022 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 Adriano Faria Posted March 14, 2022 Solution Posted March 14, 2022 See: https://invisioncommunity.com/forums/topic/458169-using-custom-profile-fields-in-the-welcome-email/?do=findComment&comment=2827843 To get the group ID: To get the profile field ID: Field in the user profile: Example: {{$field = \IPS\Member::loggedIn()->profileFields( \IPS\core\ProfileFields\Field::PROFILE )['core_pfieldgroups_1']['core_pfield_3'];}} Value: {$field} Output: I'm not sure but *I think* there's a way to get the field by ID but I couldn't find examples.
Nigel Moore Posted May 20, 2022 Author Posted May 20, 2022 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: To get the profile field ID: Field in the user profile: Example: {{$field = \IPS\Member::loggedIn()->profileFields( \IPS\core\ProfileFields\Field::PROFILE )['core_pfieldgroups_1']['core_pfield_3'];}} Value: {$field} Output: 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 Adriano Faria 1
Recommended Posts