hook_node_access_records

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
DrupalCuckoo's picture

Call hook_node_access_records() from custom function

hi,

usually the hook "hook_node_access_records($node)" gets called when you hit the save-button on the edit page of a node. I need to call this function outside the edit-form.

I'm building a custom content-privacy module and I need to call this function for all existing nodes filtered by content-type (for example all blog nodes).

The problem I have is that this hook needs a node-object as a parameter. When being on a node-edit page (node/[NID]/edit) this object will be available. But when I don't edit a node I have no node-object available.

Read more
Subscribe with RSS Syndicate content