summaryrefslogtreecommitdiffstats
path: root/lib/feedmapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feedmapper.php')
-rw-r--r--lib/feedmapper.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/feedmapper.php b/lib/feedmapper.php
index 16804a1a7..35847acdf 100644
--- a/lib/feedmapper.php
+++ b/lib/feedmapper.php
@@ -72,6 +72,19 @@ class FeedMapper {
return $feeds;
}
+
+ /**
+ * @brief returns the number of feeds that a user has
+ * @returns the number of feeds that a user has
+ */
+ public function feedCount() {
+ $query = 'SELECT COUNT(*) AS size FROM ' . self::tableName . ' WHERE user_id = ?';
+ $stmt = \OCP\DB::prepare($query);
+ $result = $stmt->execute(array($this->userid))->fetchRow();
+ return $result['size'];
+ }
+
+
/**
* @brief Retrieve a feed from the database
* @param id The id of the feed in the database table.