function nodequeue_api_queue_access in Nodequeue 5.2
Same name and namespace in other branches
- 6.2 nodequeue.module \nodequeue_api_queue_access()
- 7.3 nodequeue.module \nodequeue_api_queue_access()
- 7.2 nodequeue.module \nodequeue_api_queue_access()
Allows the owning module of a queue to restrict access to viewing and manipulating the queue.
1 call to nodequeue_api_queue_access()
- nodequeue_queue_access in ./
nodequeue.module - Return TRUE If the specified account has access to manipulate this queue.
File
- ./
nodequeue.module, line 2421
Code
function nodequeue_api_queue_access($queue, $account = NULL) {
if (!$account) {
global $user;
$account = $user;
}
if ($queue->owner != 'nodequeue') {
// Avoids an infinite loop.
$function = $queue->owner . '_queue_access';
if (function_exists($function)) {
$access = $function($queue, $account);
}
}
if (!isset($access)) {
$access = TRUE;
}
return $access;
}