You are here

function hook_access_grant_delete in Access Control Kit 7

Responds to access grant deletion.

This hook is invoked from AccessGrantEntityController::delete() before hook_entity_delete() and field_attach_delete() are called, and before the grant is removed from the access_grant table in the database.

Parameters

object $grant: The access grant that is being deleted.

1 invocation of hook_access_grant_delete()
AccessGrantEntityController::delete in ./access_grant_entity_controller.inc
Deletes an access grant from the database.

File

./access.api.php, line 459
Hooks provided by the access control kit module.

Code

function hook_access_grant_delete($grant) {

  // Notify the user whenever an access grant is removed for user 1.
  if ($grant->uid == 1) {
    drupal_set_message(t('An access grant was deleted for the site administrator.'));
  }
}