user_admin_access_delete

Versions
4.6 – 4.7
user_admin_access_delete($aid = 0)

Menu callback: delete an access rule

Code

modules/user.module, line 1626

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.