Home › Forums › General Issues › Problem using update_field with user field › Reply To: Problem using update_field with user field
Hi @esedeerre
For complex fields, ACF stores the value in wp_postmeta as a serialized PHP array.
Hmm… I believe you should be able to update the user field using update_field(…) function. The code should look something like this:
$administradores[] = $new_user_id;
update_field( $field_key, $administradores, $post_id );
where $new_user_id is the ID of a new user and $administradores contains user IDs of the previously selected users.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.