Hi!
I am trying to sync fields in the custom registration form with the default wordpress profile.
E.g. I have the field "firstname" and "lastname" in buddypress and I want to sync this with the first and last name in wordpress. I use this plugin to fix it: https://wordpress.org/plugins/bp2wp-full-sync/
It works with the default buddypress registration but not in a custom registration form. Is there any way I can embed this in the custom registration form?
Would be amazing!
Kind regards
@dantwah,
For that, we have to check the code of custom registration form which is in vibe customtypes plugin and check the code of this plugin a well.
After analyzing both the codes, I can tell you if it is possible or not.
But right now we are not focusing on any such feature of registration forms so you have to wait for this
In the plugin this function is responsible for updating the name fields from buddypress to wordpress profile:
add_filter( 'bp_xprofile_set_field_data_pre_validate', array( &$this, 'bp2wp_update_sync_field' ), 1, 3 );
public function bp2wp_update_sync_field( $value, $field, $field_type_obj ) {
if ( $field ) {
$childs = $field->get_children();
if (isset($childs) && $childs && count($childs) > 0
&& is_object($childs[0]) && $childs[0]->type == 'bp2wp_sync') {
if ( null !== bp_displayed_user_id() && bp_displayed_user_id() > 0 )
$this->bp_user_id = bp_displayed_user_id();
$this->synced = true;
update_user_meta( $this->bp_user_id, $childs[0]->name, $value );
}
}
return $value;
}
So something like this should be added to the custom registration form I guess. Preferably as a function in the child theme to make it update proof.
If its considers a bit of work would it be possible to take it up as a paid customization?
Kind regards
@dantwah
Actually, we are already loaded with the work. So I am not sure whether this will be completed by the promised time duration or not. It's better if you can hire someone for this
Apologies for this..