How to display the default user picture programatically?
It's a bit of a strangled route - Drupal itself uses some conditionals in template_preprocess_user_picture() to make that decision:

if (!empty($account-&gt;picture)) {
  // @TODO: Ideally this function would only be passed file objects, but
  // since there's a lot of legacy code that JOINs the {users} table to
  // {node} or {comments} and passes the results into this function if we
  // a numeric value in the picture field we'll assume it's a file id
  // and load it for them. Once we've got user_load_multiple() and
  // comment_load_multiple() functions the user module will be able to load
  // the picture files in mass during the object's load process.
  if (is_numeric($account-&gt;picture)) {
    $account-&gt;picture = file_load($account-&gt;picture);
  }
  if (!empty($account-&gt;picture-&gt;uri)) {
    $filepath = $account-&gt;picture-&gt;uri;
  }
}
elseif (variable_get('user_picture_default', '')) {
  $filepath = variable_get('user_picture_default', '');
}


If it suits your use case, you can just set the user_picture_style variable to your style name, and use theme_user_picture():

$build = array(
  '#theme' =&gt; 'user_picture',
  '#account' =&gt; $user,
);
$picture = drupal_render($build);


The caveat is that user_picture_style is a global var, so if you want to use something different for the style used elsewhere in the site, you're stuck with reproducing the same logic as the preprocess function above.