From 80c6efa1e8d360e5f35a42de0a783b28bcc9e198 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Wed, 19 Dec 2018 15:07:32 +0100 Subject: [PATCH] fixes #1695, post comment count is incorrectly calculated based on all posts, including events --- framework/core/src/User/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/User/User.php b/framework/core/src/User/User.php index 3fc2f2110..45c248059 100644 --- a/framework/core/src/User/User.php +++ b/framework/core/src/User/User.php @@ -753,7 +753,7 @@ class User extends AbstractModel */ public function refreshCommentCount() { - $this->comment_count = $this->posts()->count(); + $this->comment_count = $this->posts()->where('type', 'comment')->count(); return $this; }