You are here

function advanced_forum_forum_container_ctools_access_check in Advanced Forum 7.2

Same name and namespace in other branches
  1. 6.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'
forum_container.inc in plugins/access/forum_container.inc
Plugin to provide access control based upon term vocabulary

File

plugins/access/forum_container.inc, line 50
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']);
}