You are here

function user_admin in Drupal 4

Same name and namespace in other branches
  1. 5 modules/user/user.module \user_admin()
  2. 6 modules/user/user.admin.inc \user_admin()
  3. 7 modules/user/user.admin.inc \user_admin()
1 string reference to 'user_admin'
user_menu in modules/user.module
Implementation of hook_menu().

File

modules/user.module, line 2020
Enables the user registration and login system.

Code

function user_admin() {
  $edit = isset($_POST['edit']) ? $_POST['edit'] : '';
  $op = isset($_POST['op']) ? $_POST['op'] : '';
  if (empty($op)) {
    $op = arg(2);
  }
  switch ($op) {
    case 'search':
    case t('Search'):
      $output = search_form(url('admin/user/search'), $_POST['edit']['keys'], 'user') . search_data($_POST['edit']['keys'], 'user');
      break;
    case t('Create new account'):
    case 'create':
      $output = user_register();
      break;
    default:
      $output = user_admin_account();
  }
  return $output;
}