function exclude_node_title_check_perm in Exclude Node Title 6
Same name and namespace in other branches
- 8 exclude_node_title.module \exclude_node_title_check_perm()
- 7 exclude_node_title.module \exclude_node_title_check_perm()
Check permission to change node title exclusion.
2 calls to exclude_node_title_check_perm()
- exclude_node_title_form_alter in ./
exclude_node_title.module - Implementation of hook_form_alter().
- exclude_node_title_nodeapi in ./
exclude_node_title.module - Implementation of hook_nodeapi().
File
- ./
exclude_node_title.module, line 144 - Primarily Drupal hooks and global API functions to exclude node titles.
Code
function exclude_node_title_check_perm($node) {
global $user;
if (user_access('exclude any node title')) {
return TRUE;
}
if (!user_access('exclude own node title')) {
return FALSE;
}
return !strcmp($node->name, $user->name);
}