You are here

function advanced_forum_forum_container_ctools_access_check in Advanced Forum 6.2

Same name and namespace in other branches
  1. 7.2 plugins/access/forum_container.inc \advanced_forum_forum_container_ctools_access_check()

Check for access.

1 string reference to 'advanced_forum_forum_container_ctools_access_check'
advanced_forum_forum_container_ctools_access in plugins/access/forum_container.inc
Implementation of specially named hook_ctools_access().

File

plugins/access/forum_container.inc, line 49
Plugin to provide access control based upon term vocabulary

Code

function advanced_forum_forum_container_ctools_access_check($conf, $context) {

  // As far as I know there should always be a context at this point, but this
  // is safe.
  if (empty($context) || empty($context->data)) {
    return FALSE;
  }

  // xor returns false if the two bools are the same, and true if they are not.
  return $context->data->container xor !empty($conf['container']);
}