You are here

function nodequeue_nodequeue_access in Nodequeue 7.3

Same name and namespace in other branches
  1. 7.2 nodequeue.module \nodequeue_nodequeue_access()

Return TRUE if $user can queue(s) for this node.

Parameters

$type: The node type.

$location: Optional argument. May be one of:

  • 'links': Only check for queues that have node links.
  • 'tab': Only check for queues that appear on the node tab.
  • 'ui': Only check for queues that appear in the UI.
1 call to nodequeue_nodequeue_access()
nodequeue_node_and_queue_access in ./nodequeue.module
Used by menu system to determine access to the node and the queue in question.

File

./nodequeue.module, line 1928
Maintains queues of nodes in arbitrary order.

Code

function nodequeue_nodequeue_access($type, $location = NULL, $account = NULL) {
  if (isset($type->type)) {
    $type = $type->type;
  }
  $queues = nodequeue_get_queues($type, $account);
  if ($location) {
    nodequeue_filter_queues($queues, $location);
  }
  return !empty($queues);
}