WordPress.org

Ready to get started?Download WordPress

Forums

How to update user meta when buddypress profile is updated (1 post)

  1. bluesalman
    Member
    Posted 8 months ago #

    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.

Reply

You must log in to post.

About this Topic