function comment_perm_preprocess_box in Comment Permissions 6
'Post new comment' forms on the node page should be removed if a user doesn't have permission to post comments.
File
- ./
comment_perm.module, line 298 - Module to control commenting permissions by role and by node type.
Code
function comment_perm_preprocess_box(&$variables) {
if (arg(0) == 'node' && is_numeric(arg(1))) {
if (!comment_perm_access(arg(1))) {
if ($variables['title'] == t('Post new comment')) {
unset($variables['title']);
unset($variables['content']);
}
}
}
}