You are here

function hook_access_grant_presave in Access Control Kit 7

Acts on an access grant that is about to be inserted or updated.

This hook is invoked from AccessGrantEntityController::save() before the grant is saved to the database.

Parameters

object $grant: The access grant that is being inserted or updated.

1 invocation of hook_access_grant_presave()
AccessGrantEntityController::save in ./access_grant_entity_controller.inc
Saves an access grant to the database.

File

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

Code

function hook_access_grant_presave($grant) {

  // Set a timestamp to log when the grant was last modified.
  $grant->modified = time();
}