summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 52549f974..6b6dedb65 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2287,7 +2287,8 @@ function theme_comment_post_forbidden($variables) {
if (!isset($authenticated_post_comments)) {
// We only output a link if we are certain that users will get permission
// to post comments by logging in.
- $authenticated_post_comments = array_key_exists(DRUPAL_AUTHENTICATED_RID, user_roles(TRUE, 'post comments') + user_roles(TRUE, 'skip comment approval'));
+ $comment_roles = user_roles(TRUE, 'post comments') + user_roles(TRUE, 'skip comment approval');
+ $authenticated_post_comments = isset($comment_roles[DRUPAL_AUTHENTICATED_RID]);
}
if ($authenticated_post_comments) {