Skip to:
Content
Pages
Categories
Search
Top
Bottom

Updating User Meta on the Profile

  • Avatar of noelgreen
    noelgreen
    Participant

    @noelgreen

    I have a custom form that I’m using to update user meta data with but it’s not jiving with Buddy Press.

    Here’s the code I have in to update…

    `
    update_user_meta( $current_user->ID, ‘first_name’, $new_first_name );
    `
    Where “$new_first_name” is the value entered in the form.

    It’s not working on the email or password fields either… where I have the following…
    `$args = array(
    ‘ID’ => $current_user->id,
    ‘user_email’ => esc_attr( $entry )
    );
    wp_update_user( $args );
    `
    These things work on other non-buddypress sites, so I’m thinking it has to be how BP stores the member info.

    I’m using this to populate the form with the user’s information…
    `
    $ud = get_userdata( bp_displayed_user_id() );
    $current_user_data = $ud->first_name;
    `
    That works.

    Does anyone know the function call to update the user data?

The topic ‘Updating User Meta on the Profile’ is closed to new replies.