You are here

function simple_access_delete_group in Simple Access 7.2

Same name and namespace in other branches
  1. 5.2 simple_access.module \simple_access_delete_group()
  2. 5 simple_access.module \simple_access_delete_group()
  3. 6.2 simple_access.module \simple_access_delete_group()

Delete group from all 3 tables.

1 call to simple_access_delete_group()
simple_access_delete_group_confirm_submit in ./simple_access.admin.inc
Delete group confirm submit callback.

File

./simple_access.module, line 797
This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.

Code

function simple_access_delete_group($gid) {
  foreach (array(
    'simple_access_roles',
    'simple_access_groups',
    'simple_access_node',
  ) as $table) {
    db_delete($table)
      ->condition('gid', $gid)
      ->execute();
  }
}