Use node_access instead of node_node_access

Created on 8 July 2015, almost 10 years ago
Updated 25 April 2025, 1 day ago

This is my understanding of it, please correct me if I am wrong (which very possibly is the case).

node_node_access gets the permissions without invoking other hook_node_access functions.
node_access invokes all other hook_node_access functions.

This is the module code

     if(access_by_ref_node_access($refnode, $op, $account) == NODE_ACCESS_ALLOW ||
			   node_node_access($refnode, $op, $account) == NODE_ACCESS_ALLOW) {
		       return NODE_ACCESS_ALLOW;

I am using another module to give access to the referenced node. The usage of node_node_access does not give me the required results. I changed the code to node_access and got the desired result.

		     if(access_by_ref_node_access($refnode, $op, $account) == NODE_ACCESS_ALLOW ||
			   node_access($op, $refnode, $account)){
		       return NODE_ACCESS_ALLOW;
		     }
✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany JThan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024