You are here

function _comment_perm_access_denied_message in Comment Permissions 6

Same name and namespace in other branches
  1. 5 comment_perm.module \_comment_perm_access_denied_message()
  2. 7 comment_perm.module \_comment_perm_access_denied_message()
2 calls to _comment_perm_access_denied_message()
comment_perm_comment in ./comment_perm.module
Implementation of hook_comment().
comment_perm_form_alter in ./comment_perm.module
Implementation of hook_form_alter().

File

./comment_perm.module, line 263
Module to control commenting permissions by role and by node type.

Code

function _comment_perm_access_denied_message() {
  global $user;
  if ($user->uid == 0) {
    return variable_get('comment_perm_message_anon', t('Login or register to post comments!'));
  }
  else {
    return variable_get('comment_perm_message_reg', t("We're sorry, but you can't post comments here!"));
  }
}