function nopremium_access_full_content in Node Option Premium 7
Same name and namespace in other branches
- 6 nopremium.module \nopremium_access_full_content()
Determine whether the current user may access the full content of the specified nopremium node.
3 calls to nopremium_access_full_content()
- nopremium_file_download in ./
nopremium.module - Implementation of hook_file_download().
- nopremium_node_view in ./
nopremium.module - Implementation of hook_node_view().
- nopremium_node_view_alter in ./
nopremium.module - Implementation of hook_node_view_alter().
File
- ./
nopremium.module, line 343 - 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 premium content of any type', $account) || user_access('view full ' . $node->type . ' premium content', $account) || node_access('update', $node, $account) || $account->uid && $account->uid == $node->uid;
}