Function/Call to access Custom Profile Fields?
Okay, I have been browsing the site up and down…and I feel like I am missing something obvious…sorry if it has already been answered, but I couldnt find it.
What is the best approach (is there a function or api) to access custom fields within a plugin I want to create….or do I have to do it through sql directly.
Lets say I setup a plugin that wants to evaluate whether to do something based on the age of a member. The age is a custom text field I created in the profile field setup in the buddypress admin….
How can I actually get & set THAT custom xprofile data for use in the plugin?
If this sets the display_name
xprofile_set_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $usermeta[‘display_name’], $user_id );
Then is there something that is similar to set data to a “custom” field like my age example…and vice versa, whats the best way to “get” the data too
I hope my question is clear, but if it isnt please let me know
- The topic ‘Function/Call to access Custom Profile Fields?’ is closed to new replies.