Why are default values in a checkboxes $form not displayed?
For form elements expecting multi-value defaults, Drupal expects an array where keys and values are equal to the keys in your options array. Something like the following should work:

$defaults = array(
    'uid' =&gt; 'uid',
    'name' =&gt; 'name',
);


You may also use $defaults = drupal_map_assoc(array('uid', 'name'));.