You are here

function hook_workbench_access_delete_role in Workbench Access 7

Responds to the deletion of a role-based section assignment.

This hook fires when a roleis removed from a section. Note that this hook fires _before_ the base tables are cleared, in case you need to retrieve data from those tables.

Parameters

$role: The active role object.

$access_id: The access id to store.

$access_scheme: The active access scheme as defined by hook_workbench_access_info().

1 invocation of hook_workbench_access_delete_role()
workbench_access_role_section_delete in ./workbench_access.module
Deletes an access rule from the {workbench_access_user} table.

File

./workbench_access.api.php, line 450
API documentation file for Workbench Access.

Code

function hook_workbench_access_delete_role($role, $access_id, $access_scheme) {

  // Notify our module if the section is related to taxonomy.
  if ($access_scheme['access_type'] == 'taxonomy') {
    mymodule_delete_role($role, $access_id);
  }
}