You are here

function acl_delete_acl in ACL 8

Same name and namespace in other branches
  1. 5 acl.module \acl_delete_acl()
  2. 6 acl.module \acl_delete_acl()
  3. 7 acl.module \acl_delete_acl()

Delete an existing ACL.

1 call to acl_delete_acl()
AclTest::testNodeAclCreateDelete in src/Tests/AclTest.php
Includes acl_create_acl, acl_delete_acl, acl_get_id_by_name

File

./acl.module, line 48
An API module providing by-user access control lists.

Code

function acl_delete_acl($acl_id) {
  $database = \Drupal::database();
  $database
    ->delete('acl')
    ->condition('acl_id', $acl_id)
    ->execute();
  $database
    ->delete('acl_user')
    ->condition('acl_id', $acl_id)
    ->execute();
  $database
    ->delete('acl_node')
    ->condition('acl_id', $acl_id)
    ->execute();
}