From 010cfbbb13111667b238954b40c218027a76810f Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 21 Nov 2014 11:10:34 +0000 Subject: [PATCH] Issue #2372909 by Tom Verhaeghe: Comments to check '$comment->getOwner->isAnonymous()' instead of assuming anonymous is ID 0 --- core/modules/comment/templates/comment.html.twig | 2 +- core/themes/bartik/templates/comment.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/comment/templates/comment.html.twig b/core/modules/comment/templates/comment.html.twig index 24dbd079627..ba62e2ba254 100644 --- a/core/modules/comment/templates/comment.html.twig +++ b/core/modules/comment/templates/comment.html.twig @@ -70,7 +70,7 @@ set classes = [ 'comment', status != 'published' ? status, - not author_id ? 'by-anonymous', + comment.owner.anonymous ? 'by-anonymous', author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author', 'clearfix', ] diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig index 0fa199146bd..0e402303f99 100644 --- a/core/themes/bartik/templates/comment.html.twig +++ b/core/themes/bartik/templates/comment.html.twig @@ -68,7 +68,7 @@ set classes = [ 'comment', status != 'published' ? status, - not author_id ? 'by-anonymous', + comment.owner.anonymous ? 'by-anonymous', author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author', 'clearfix', ]