You are here

function user_admin_access_delete_confirm in Drupal 5

Same name and namespace in other branches
  1. 6 modules/user/user.admin.inc \user_admin_access_delete_confirm()

Menu callback: delete an access rule

1 string reference to 'user_admin_access_delete_confirm'
user_menu in modules/user/user.module
Implementation of hook_menu().

File

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

Code

function user_admin_access_delete_confirm($aid = 0) {
  $access_types = array(
    'user' => t('username'),
    'mail' => t('e-mail'),
    'host' => t('host'),
  );
  $edit = db_fetch_object(db_query('SELECT aid, type, status, mask FROM {access} WHERE aid = %d', $aid));
  $form = array();
  $form['aid'] = array(
    '#type' => 'hidden',
    '#value' => $aid,
  );
  $output = confirm_form($form, t('Are you sure you want to delete the @type rule for %rule?', array(
    '@type' => $access_types[$edit->type],
    '%rule' => $edit->mask,
  )), 'admin/user/rules', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
  return $output;
}