Skip to content

Instantly share code, notes, and snippets.

@DuaelFr
Created July 4, 2013 17:20
Show Gist options
  • Save DuaelFr/5929208 to your computer and use it in GitHub Desktop.
Save DuaelFr/5929208 to your computer and use it in GitHub Desktop.
function entity_access($op, $entity_type, $entity = NULL, $account = NULL) {
if (($info = entity_get_info()) && isset($info[$entity_type]['access callback'])) {
return $info[$entity_type]['access callback']($op, $entity, $account, $entity_type);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment