You are here

function config_perms_delete in Custom Permissions 6.2

Same name and namespace in other branches
  1. 7.2 config_perms.module \config_perms_delete()

Delete a perm.

Parameters

$name: A perm object, or a perms name

1 call to config_perms_delete()
config_perms_admin_form_submit in ./config_perms.admin.inc
Submit handler.

File

./config_perms.module, line 204
Adds more granular permissions for items under 'administer site configuration'.

Code

function config_perms_delete($perm) {
  $pid = is_object($perm) ? $perm->pid : $perm;
  db_query('DELETE FROM {config_perms} WHERE pid = %d', $pid);
  if (module_exists('ctools')) {

    // Clear the Ctools export API cache.
    ctools_include('export');
    ctools_export_load_object_reset('config_perms');
  }
}