Skip to content
Snippets Groups Projects
Unverified Commit 5f06643b authored by Michael McAndrew's avatar Michael McAndrew Committed by GitHub
Browse files

Update hook_civicrm_selectWhereClause.md

Add a note to say that this hook will only be invoked for API calls if check_permissions is set to 1
parent 2dbb477f
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,9 @@ This hook is called when executing a SELECT query.
The hook is called
once for each entity in the query, allowing you to add (or remove)
restrictions specific to that entity.
restrictions specific to that entity. Note that this hook will only be
invoked for API calls if check_permissions is set to 1. It will be
bypassed for API calls that do not set this parameter.
This hook is new in 4.7 and coverage is limited. The Case entity is
fully covered by this hook; selecting cases via api, ui, or searches
......@@ -58,4 +60,4 @@ like so:
if ($entity == 'Email') {
$clauses['contact_id'][] = "IN (SELECT id FROM civicrm_contact WHERE contact_type = 'Individual')";
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment