Commit 8da49651 authored by jhodgdon's avatar jhodgdon
Browse files

Issue #1885420 by kim.pepper, xjm: Document that node access queries on other tables need metadata

parent 62c93ff8
......@@ -2872,6 +2872,14 @@ function node_access_view_all_nodes($account = NULL) {
* node access checks for the user account given by the 'account' meta-data (or
* global $user if not provided), for an operation given by the 'op' meta-data
* (or 'view' if not provided; other possible values are 'update' and 'delete').
* Queries tagged with 'node_access' that are not against the {node} table
* must add the base table as metadata. For example:
* @code
* $query
* ->addTag('node_access')
* ->addMetaData('base_table', 'taxonomy_index');
* @endcode
function node_query_node_access_alter(AlterableInterface $query) {
global $user;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment