}
// Verify user permission on related contact
- $employers = CRM_Contact_BAO_Relationship::getPermissionedEmployer($user);
- if (!isset($employers[$cid])) {
+ $organizations = CRM_Contact_BAO_Relationship::getPermissionedContacts($user, NULL, NULL, 'Organization');
+ if (!isset($organizations[$cid])) {
CRM_Utils_System::civiExit();
}