Hide authoring information programmatically in a content type
I assume you need to hide the Authored by part basing on some conditions you check at run-time. If you need to hide that only for a content type, for example for the Article content type, then you can change settings in admin/structure/types/manage/article.


  


If you want to hide that information basing on the user ID of the user who created the node, then you could use the following code.

function mymodule_preprocess_node(&amp;$vars) {
  $node = $vars['node'];

  // Remove that information if the node has been created from the user #1.  
  if ($node-&gt;uid == 1) {
    $vars['display_submitted'] = FALSE;
    $vars['submitted'] = '';
    $vars['user_picture'] = '';
  }
}


Notice I am setting the same variables set by template_preprocess_node(), which uses the following code.

  // Display post information only on certain node types.
  if (variable_get('node_submitted_' . $node-&gt;type, TRUE)) {
    $variables['display_submitted'] = TRUE;
    $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' =&gt; $variables['name'], '!datetime' =&gt; $variables['date']));
    $variables['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' =&gt; $node)) : '';
  }
  else {
    $variables['display_submitted'] = FALSE;
    $variables['submitted'] = '';
    $variables['user_picture'] = '';
  }


The template files used by Drupal core check $display_submitted before rendering $submitted and $user_picture. Probably Drupal core sets also $variables['submitted'] and $variables['user_picture'] for those template files that render them without checking first $display_submitted.