Call hook_node_access_records() from custom function
Posted by DrupalCuckoo on June 29, 2010 at 3:13pm
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