User listing not showing up with user reference when create programmatically I am using the References module to create a User Reference programmatically.  However, when I use the field that is created, there is no listing of the users to choose from.  The User Reference works when I create a field from the UI.  

I first create the field as follows in my hook_install function:

    $field = array(
        'field_name' =&gt; 'vendor_user_reference',
        'type' =&gt; 'user_reference',
        'cardinality' =&gt; 1,
        'entity_types' =&gt; array('commerce_product'),
        'translatable' =&gt; FALSE,
        'locked' =&gt; TRUE,
    );
    field_create_field($field);


I then call when the product type is created the following code

$instance = field_info_instance('commerce_product', 'vendor_user_reference', $product_type['type']);

if (empty($instance)) {
    $new_instance = array(
            'field_name' =&gt; 'vendor_user_reference',
            'entity_type' =&gt; 'commerce_product',
            'bundle' =&gt; $product_type['type'],

            'label' =&gt; t('Vendor User Reference'),
            'required' =&gt; TRUE,
            'settings' =&gt; array(),
            'widget' =&gt; array(
                'type' =&gt; 'user_reference_autocomplete',
                'weight' =&gt; -10,
                'settings' =&gt; array(
                        'autocomplete_match' =&gt; 'contains',
                        'size' =&gt; 20,
                        'autocomplete_path' =&gt; 'user_reference/autocomplete',
                ), //end setting array
            ), //end widget array   
            'display' =&gt; array(),
    );
    field_create_instance($new_instance);
}


This creates the field on the entity/bundle, but when I try to use it from the UI, there are no user listings.  This is the case if I use select list or autocomplete.

What am I doing wrong?
Programmatically create user reference field

I have found the solution to having the user reference field populate the user option list programmatically.  You need to initialize the referenceable_status settings when defining the user reference field.  See my answer in the Question above.