Skip to content

Instantly share code, notes, and snippets.

@init90
Created January 5, 2017 15:21
Show Gist options
  • Select an option

  • Save init90/c290ceb938c528cdb9eadd1910e9738f to your computer and use it in GitHub Desktop.

Select an option

Save init90/c290ceb938c528cdb9eadd1910e9738f to your computer and use it in GitHub Desktop.
Drupal 7, disable access check in entity query.
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->propertyCondition('type', 'feasibility_plan')
->propertyCondition('uid', $uid)
->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');
if ($personal_view) {
$query->fieldCondition('field_show_in_student_record', 'value', 1, '=');
}
$res = $query->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment