function user_admin_access_delete_confirm in Drupal 6
Same name and namespace in other branches
- 5 modules/user/user.module \user_admin_access_delete_confirm()
Menu callback: delete an access rule
See also
user_admin_access_delete_confirm_submit()
Related topics
1 string reference to 'user_admin_access_delete_confirm'
- user_menu in modules/
user/ user.module - Implementation of hook_menu().
File
- modules/
user/ user.admin.inc, line 882 - Admin page callback file for the user module.
Code
function user_admin_access_delete_confirm($form_state, $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;
}