remove getPermissionedEmployer fn
[civicrm-core.git] / CRM / Core / Page / AJAX / Location.php
index c5a4bda3419ae8fc23517e14916d8f974f998ff0..50473b6dbba3bc5f1906020ea240bba9b37500e7 100644 (file)
@@ -58,7 +58,10 @@ class CRM_Core_Page_AJAX_Location {
     }
 
     // Verify user permission on related contact
-    $employers = CRM_Contact_BAO_Relationship::getPermissionedContacts($user);
+    $employers = CRM_Contact_BAO_Relationship::getPermissionedContacts(
+      $user,
+      CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_RelationshipType', 'Employee of', 'id', 'name_a_b')
+    );
     if (!isset($employers[$cid])) {
       CRM_Utils_System::civiExit();
     }