• Since BP 2.1 (coming out soon) it’s possible to filter the xprofile group query with the bp_xprofile_get_groups filter without recreating the entire bp_has_profile query. I think this enables the plugin developer to create the First Name and Last Name profile fields on the fly, after BP queried the profile groups with its fields. Setting the profile data for these fields would only be a matter of copying the logic from BP_Groups_Group::get().

    My guess is that this would in turn create a situation where the profile field data does not have to be deleted on plugin deactivation, simply because the fields would not be queried when they’re not self-existent in the DB as fields. So only the data would remain in the DB, not the fields themselves.

    I’d be willing to fork your Github project if you’d prefer that.

    https://www.ads-software.com/plugins/bp-xprofile-wp-user-sync/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Christian Wach

    (@needle)

    Hi Laurens, an example on GitHub would be great!

    Plugin Author Christian Wach

    (@needle)

    Hi Laurens, I realise that it’s not a perfect solution (in that the plugin now stores options on deactivation that help it reconnect the “first name” and “last name” fields to their pre-deactivation data) but does the latest plugin solve this issue for you? If so, I’ll mark this thread as resolved and tag our conversation on Github as an “enhancement” issue.

    Cheers, Christian

    Thread Starter Laurens Offereins

    (@offereins)

    Hi Christian, that is fine by me. I’m sorry you haven’t heard from me in a while. Got a lot on my mind, but I haven’t forgotten about our conversation. Can’t tell when you’ll get a PR from me, but I’m still interested in your project.

    Cheers, Laurens

    Plugin Author Christian Wach

    (@needle)

    No worries, Laurens, it’s on the back-burner for me too now that I’ve implemented a working solution. Thanks for responding.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Suggestion: create fields on the fly in BP 2.1’ is closed to new replies.