You are here

function config_perms_delete in Custom Permissions 7.2

Same name and namespace in other branches
  1. 6.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 191
Allows additional permissions to be created and managed through a administration form

Code

function config_perms_delete($perm) {
  $pid = is_object($perm) ? $perm->pid : $perm;
  db_delete('config_perms')
    ->condition('pid', $pid)
    ->execute();
  if (module_exists('ctools')) {

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