function coherent_access_nodeapi(): select db queries on lines 436 and 440 are wrong.

I would suggest to use the same select db queries as function coherent_access_get_user_nodes() on line 797.

Comments

jp.stacey’s picture

I'm not sure how they're wrong: don't they want to restrict the realm to just coherent_access? That's what hook_node_access_records() is there to ensure. In contrast, the later SQL is intended to retrieve all nodes for a given user, regardless of realm.

(btw, the SQL in coherent_access_get_user_nodes is somewhere different in head, at line 767.)