WordPress & Buddypress profile fields Intergration

Hello,

Is there any plugin or code snippet that would intergrate profile fields like address or phone number between buddypress and wordpress?

Thank you!

  • lesanis
    • Design Lord, Child of Thor

    Hello Kasia,

    I would like to create 2 more wordpress profile fields in the dashboard and sync them with xprofile fields. So that info will be searchable in wordpress dashboard. I have found this function

    function xprofile_sync_wp_profile( $user_id = 0 ) {

    // Bail if profile syncing is disabled.
    if ( bp_disable_profile_sync() ) {
    return true;
    }

    if ( empty( $user_id ) ) {
    $user_id = bp_loggedin_user_id();
    }

    if ( empty( $user_id ) ) {
    return false;
    }

    $fullname = xprofile_get_field_data( bp_xprofile_fullname_field_id(), $user_id );
    $space = strpos( $fullname, ' ' );

    if ( false === $space ) {
    $firstname = $fullname;
    $lastname = '';
    } else {
    $firstname = substr( $fullname, 0, $space );
    $lastname = trim( substr( $fullname, $space, strlen( $fullname ) ) );
    }

    bp_update_user_meta( $user_id, 'nickname', $fullname );
    bp_update_user_meta( $user_id, 'first_name', $firstname );
    bp_update_user_meta( $user_id, 'last_name', $lastname );

    wp_update_user( array( 'ID' => $user_id, 'display_name' => $fullname ) );
    wp_cache_delete( 'bp_core_userdata_' . $user_id, 'bp' );
    }

    Is there a way to create new profile fields in wordpress dashboard (address and phone) and sync them with the same xprofile fields of buddypress?

    Thank you!

  • lesanis
    • Design Lord, Child of Thor

    Hello again Kasia,

    I finally found the solution! If anybody else is interested in doing the same thing that is possible with s2member plugin. Navigate from wordpress dashboard to s2member->general options->Registration/Profile fields & Options

    Thank you

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.