Support

Account

Home Forums Backend Issues (wp-admin) [Login WP] Connect single field to an external api Reply To: [Login WP] Connect single field to an external api

  • I entered the string here, is that correct?

    
    // A new user has been created
                $new_user_id = wp_insert_user($userdata);
                // get value from response you want to set
                update_field('field_60084ad3970a8', $value, 'user_'.$new_user_id);
                // Assign editor role to the new user (so he can access protected articles)
                wp_update_user(
                    array(
                        'role' => 'editor'
                    )
                );
                // Load the new user info
                $user = new WP_User ($new_user_id);
    

    I did a test but I don’t populate the field, I attach image as an example (this user externally has an id 970)

    User ID (back WP)