function user_admin

7.x user.admin.inc user_admin($callback_arg = '')
6.x user.admin.inc user_admin($callback_arg = '')

Page callback: Generates the appropriate user administration form.

This function generates the user registration, multiple user cancellation, or filtered user list admin form, depending on the argument and the POST form values.

Parameters

string $callback_arg: (optional) Indicates which form to build. Defaults to '', which will trigger the user filter form. If the POST value 'op' is present, this function uses that value as the callback argument.

Return value

string A renderable form array for the respective request.

1 string reference to 'user_admin'
user_menu in drupal-6.x/modules/user/user.module
Implementation of hook_menu().

File

drupal-6.x/modules/user/user.admin.inc, line 23
Admin page callback file for the user module.

Code

function user_admin($callback_arg = '') {
  $op = isset($_POST['op']) ? $_POST['op'] : $callback_arg;

  switch ($op) {
    case t('Create new account'):
    case 'create':
      $output = drupal_get_form('user_register');
      break;
    default:
      if (!empty($_POST['accounts']) && isset($_POST['operation']) && ($_POST['operation'] == 'delete')) {
        $output = drupal_get_form('user_multiple_delete_confirm');
      }
      else {
        $output = drupal_get_form('user_filter_form');
        $output .= drupal_get_form('user_admin_account');
      }
  }
  return $output;
}