Can't hide fields in user registration form at new menu path I have a menu path which rendered User Registration Form.  The problem is I did hide fields like "Email", "password" and "status" by setting #access to FALSE. It is not working.

When I have done the same thing in hook_form_alter(), it does work.

This is my code.

/**
 * Implements hook_menu().
 */
function MY_MODULE_menu() {
  $items['admin/author/create'] = array(
    'title' =&gt; t('Author'),
    'page callback' =&gt; 'MY_MODULE_author_form',
    'type' =&gt; MENU_CALLBACK,
    'access callback' =&gt; TRUE,
  );

  return $items;
}

/**
 * Author form.
 */
function MY_MODULE_author_form() {
  drupal_set_title('Create Author');

  // Getting User Register Form
  $form = drupal_get_form('user_register_form'); 

  // Change Username to Author Name
  $form['account']['name']['#title'] = 'Author Name';

  // Exclude User Registeration Elements
  $form['account']['mail']['#access'] = FALSE;
  $form['account']['pass']['#access'] = FALSE;
  $form['account']['status']['#access'] = FALSE;

  // The path to which the form will be submitted.
  $form['#action'] = url('admin/people/create'); 

  return $form;
}


I think I can alter the form in MY_MODULE_author_form().

Is there anything wrong with my code?
Follow Drupal's standards and change your hook_menu:

/**
 * Implements hook_menu().
 */
function MY_MODULE_menu() {
  $items['admin/author/create'] = array(
    'title' =&gt; t('Author'),
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('MY_MODULE_author_form'),
    'type' =&gt; MENU_CALLBACK,
    'access callback' =&gt; TRUE,
  );

  return $items;
}