Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to update user meta when buddypress profile is updated


  • bluesalman
    Participant

    @bluesalman

    I am able to update user meta when user signs up using buddypress registration page.

    But i don’t know how to update user meta when profile is updated.

    i am using below code to add/update user meta when user signs up.

    
    add_action('bp_core_signup_user', 'ad_user_signup_usermeta', 10, 5);
    function ad_user_signup_usermeta($user_id, $user_login, $user_password, $user_email, $usermeta) {
    
         update_user_meta($user_id, 'first_name', $usermeta['field_2']);
    }

    can someone please suggest the correct hook and method to update user meta when profile is edited/updated.

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    In
    \buddypress\bp-xprofile\bp-xprofile-screens.php

    See
    do_action( ‘xprofile_updated_profile’, bp_displayed_user_id(), $posted_field_ids, $errors );

Viewing 1 replies (of 1 total)
  • The topic ‘How to update user meta when buddypress profile is updated’ is closed to new replies.
Skip to toolbar