Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save visabhishek/aa6b21b3f98780fbff41 to your computer and use it in GitHub Desktop.
Save visabhishek/aa6b21b3f98780fbff41 to your computer and use it in GitHub Desktop.
<?php
$query = new EntityFieldQuery();
$result = $query->entityCondition('entity_type', 'node')->entityCondition('bundle', 'article')->execute();
$nodes = node_load_multiple(array_keys($result['node']));
foreach ($nodes as $loaded_node) {
node_access_acquire_grants($loaded_node);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment