diff --git a/src/User/User.php b/src/User/User.php index f8fd3e0b2..c8d7821bf 100644 --- a/src/User/User.php +++ b/src/User/User.php @@ -687,7 +687,10 @@ class User extends AbstractModel */ public function refreshCommentCount() { - $this->comment_count = $this->posts()->where('type', 'comment')->count(); + $this->comment_count = $this->posts() + ->where('type', 'comment') + ->where('is_private', false) + ->count(); return $this; } @@ -699,7 +702,9 @@ class User extends AbstractModel */ public function refreshDiscussionCount() { - $this->discussion_count = $this->discussions()->count(); + $this->discussion_count = $this->discussions() + ->where('is_private', false) + ->count(); return $this; }