You are here

function hook_audit_log_it in Audit Log 7

Decide if the item has to be logged.

Parameters

Auditlog $log: The audit log that will be saved.

array $context: An array with the following keys:

  • entity: The entity on which the action is performed.
  • entity_type: The entity type of the entity on which the action is

performed.

  • action: The action that was performed ('view', 'insert', 'update' or

'delete).

  • account: The user that performed the action.
  • url: The url on which the action was performed.
  • timestamp: The timestamp when the action was performed.

object $account: The user object.

Return value

const

1 function implements hook_audit_log_it()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

audit_log_filter_audit_log_it in modules/audit_log_filter/audit_log_filter.module
Implements hook_audit_log_it().
1 invocation of hook_audit_log_it()
audit_log in ./audit_log.module
Log an audit log.

File

./audit_log.api.php, line 29
API documentation for the Audit log module.

Code

function hook_audit_log_it(Auditlog $log, array $context, $account) {
  if ($account->uid === 1) {
    return AUDIT_LOG_DO_NOT_LOG;
  }
  return AUDIT_LOG_DO_LOG;
}