diff --git a/ground/models/Point.php b/ground/models/Point.php index 792a0e2..cff7f8e 100644 --- a/ground/models/Point.php +++ b/ground/models/Point.php @@ -81,7 +81,7 @@ class Point extends Model public function getCountByUser($userId) { - $res = App::DB()->query('SELECT count(`id`) AS `cnt` FROM ' . $this->_tableName_ . ' WHERE `author` = ' . $userId . ' ;')->fetch(PDO::FETCH_ASSOC); + $res = App::DB()->query('SELECT count(`id`) AS `cnt` FROM ' . $this->_tableName_ . ' WHERE `author` = ' . $userId . ' AND `moderate` = 1 ;')->fetch(PDO::FETCH_ASSOC); return $res['cnt']; }