Created
January 5, 2017 15:21
-
-
Save init90/c290ceb938c528cdb9eadd1910e9738f to your computer and use it in GitHub Desktop.
Drupal 7, disable access check in entity query.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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