From 5f06643b0253a5a67d80ffd319b99841fae4f10d Mon Sep 17 00:00:00 2001
From: Michael McAndrew <michaelmcandrew@thirdsectordesign.org>
Date: Wed, 27 Jun 2018 13:30:29 +0100
Subject: [PATCH] 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
---
 docs/hooks/hook_civicrm_selectWhereClause.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/hooks/hook_civicrm_selectWhereClause.md b/docs/hooks/hook_civicrm_selectWhereClause.md
index f4f47d94..7fc6fe67 100644
--- a/docs/hooks/hook_civicrm_selectWhereClause.md
+++ b/docs/hooks/hook_civicrm_selectWhereClause.md
@@ -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
+    }
-- 
GitLab