Profile field create and set default value programmatically I need the checkbox to be checked by default.  Below is my code, notice the 'default_value' under the settings array.

$field_instance = array(                                      
    'field_name'    =&gt; $fielddef['field_name'],               
    'type'          =&gt; 'list_boolean',                        
    'entity_type'   =&gt; 'user',                                
    'bundle'        =&gt; 'user',                                
    'label'         =&gt; t($opts['label']),                     
    'description'   =&gt; t($opts['description']),               
    'required'      =&gt; FALSE,                                 
    'widget'        =&gt; array(                                 
        'type'      =&gt; 'options_onoff',                       
        'weight'    =&gt; 10,                                    
    ),                                                        
    'settings'      =&gt; array(                                 
        'allowed_values' =&gt; drupal_map_assoc(range(0,1)),     
        'default_value' =&gt; array(array('value' =&gt; 1))         
    )                                                         
);
field_create_instance($field_instance); 


I have tried using 'default_value' in the $field_instance array, I've also tried 'default_value_function' without success.  I feel like I'm close on this, what am I missing? Thanks!

Also, I am running Drupal 7.23 as shown on my Status Report.
I asked this question earlier on SO, but no reply so I moved it here: https://stackoverflow.com/q/19772646/988355
Try with this 

$field_instance = array(                                      
'field_name'    =&gt; $fielddef['field_name'],               
'type'          =&gt; 'list_boolean',                        
'entity_type'   =&gt; 'user',                                
'bundle'        =&gt; 'user',                                
'label'         =&gt; t($opts['label']),                     
'description'   =&gt; t($opts['description']),               
'required'      =&gt; FALSE,                                 
'widget'        =&gt; array(                                 
    'type'      =&gt; 'options_onoff',                       
    'weight'    =&gt; 10,                                    
),                                                        
'settings'      =&gt; array(                                 
    'allowed_values' =&gt; drupal_map_assoc(range(0,1)),     
    'default_value' =&gt; array(1),         
)                                                         


);