You are here

function user_admin_access_delete in Drupal 4

Menu callback: delete an access rule

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

File

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

Code

function user_admin_access_delete($aid = 0) {
  $access_types = array(
    'user' => t('username'),
    'mail' => t('e-mail'),
  );
  $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('user_admin_access_delete_confirm', $form, t('Are you sure you want to delete the %type rule for %rule?', array(
    '%type' => $access_types[$edit->type],
    '%rule' => theme('placeholder', $edit->mask),
  )), 'admin/access/rules', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
  return $output;
}