Support

Account

Home Forums General Issues Profile Update with Custom Field filled by user who updated the profile

Helping

Profile Update with Custom Field filled by user who updated the profile

  • I’ve created a custom text field that will automatically filled whose current updating or modifying the user profile. I’m using update_field(); but technically I cannot see it working even the var_dump();

    function update_user() {           
    
        $user = wp_get_current_user();
        var_dump($user);
    
        update_field( 'field_673bbd254e89a', $user->display_name, 'user_'.$user->ID );
    
    }
    add_action( 'acf/save_post', 'update_user' );
  • Your forum contributions are extremely insightful, and we would appreciate it if you left feedback on the poppy playtime website so that we could continue to develop it. Additionally, we would like to thank you for your insights.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.