You are here

function _taxonomy_access_global_controlled_terms in Taxonomy Access Control 7

Retrieves a list of terms controlled by the global default for a role.

Parameters

int $rid: The role ID.

Return value

array A list of term IDs.

Related topics

1 call to _taxonomy_access_global_controlled_terms()
_taxonomy_access_get_nodes_for_global_default in ./taxonomy_access.module
Gets node IDs associated with the roles' global defaults.

File

./taxonomy_access.module, line 770
Allows administrators to specify access control for taxonomy categories.

Code

function _taxonomy_access_global_controlled_terms($rid) {
  $tids = db_query("SELECT td.tid\n       FROM {taxonomy_term_data} td\n       LEFT JOIN {taxonomy_access_term} ta ON td.tid = ta.tid\n       LEFT JOIN {taxonomy_access_default} tad ON td.vid = tad.vid\n       WHERE ta.rid = :rid OR tad.rid = :rid", array(
    ':rid' => $rid,
  ))
    ->fetchCol();
  return $tids;
}