1

I've created a custom member field called "member_code", I'm trying to output this code but it seems to only ever output the code from the first member in the system, even when I use the member_id="3" parameter. My code is as follows:

{exp:member:custom_profile_data}{member_code}{/exp:member:custom_profile_data}

No matter which user I login as it's always outputting the first users details, any ideas? I'm running expressionengine 2.6.1

  • Seems to only output the incorrect value when it's inside a {exp:channel:entries} tag, if it's outside it'll work… – Nick May 22 '13 at 12:23
2

You can use put the code for fetching member data within embedded template and can pass member id as embed variable like:

{embed="temp_grp/temp_name" member_id="{member_id}"}

Within the template "temp_grp/temp_name" put the tag of custom profile data:

like:

{exp:member:custom_profile_data member_id="{embed:member_id}"}{member_code}{/exp:member:custom_profile_data}
| improve this answer | |
  • Thanks this works but I found an alternative method too! – Nick Sep 6 '13 at 8:26
1

Seems you have to wrap {exp:member:custom_profile_data} around {exp:channel:entries} instead of placing it inside!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.