function user_admin

cis7 user.admin.inc user_admin($callback_arg = '')
cle7 user.admin.inc user_admin($callback_arg = '')
elmsmedia7 user.admin.inc user_admin($callback_arg = '')
icor7 user.admin.inc user_admin($callback_arg = '')
meedjum_blog7 user.admin.inc user_admin($callback_arg = '')
mooc7 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.

6 string references to 'user_admin'
drupal-6.bare.database.php in modules/simpletest/tests/upgrade/drupal-6.bare.database.php
Bare installation of Drupal 6.17, for test purposes.
drupal-6.filled.database.php in modules/simpletest/tests/upgrade/drupal-6.filled.database.php
Filled installation of Drupal 6.17, for test purposes.
drupal-6.og-ui.database.php in sites/all/modules/ulmus/og/og_ui/tests/drupal-6.og-ui.database.php
Filled installation of Drupal 6.17, for test purposes.
drupal-6.og.database.php in sites/all/modules/ulmus/og/tests/drupal-6.og.database.php
Filled installation of Drupal 6.17, for test purposes.
og-7.x-1.x.database.php in sites/all/modules/ulmus/og/tests/og-7.x-1.x.database.php
Filled installation of Drupal 7.0, for test purposes.

... See full list

File

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':
      $build['user_register'] = drupal_get_form('user_register_form');
      break;
    default:
      if (!empty($_POST['accounts']) && isset($_POST['operation']) && ($_POST['operation'] == 'cancel')) {
        $build['user_multiple_cancel_confirm'] = drupal_get_form('user_multiple_cancel_confirm');
      }
      else {
        $build['user_filter_form'] = drupal_get_form('user_filter_form');
        $build['user_admin_account'] = drupal_get_form('user_admin_account');
      }
  }
  return $build;
}