You are here

function nopremium_access_full_content in Node Option Premium 6

Same name and namespace in other branches
  1. 7 nopremium.module \nopremium_access_full_content()

Determine whether the current user may access the full content of the specified nopremium node.

1 call to nopremium_access_full_content()
nopremium_nodeapi in ./nopremium.module
Implementation of hook_nodeapi().

File

./nopremium.module, line 267
Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function nopremium_access_full_content($node, $account = NULL) {
  if (empty($account)) {
    $account = $GLOBALS['user'];
  }
  return user_access('administer nodes', $account) || user_access('view full ' . $node->type . ' premium content', $account) || node_access('update', $node, $account) || $account->uid && $account->uid == $node->uid;
}