summaryrefslogtreecommitdiffstats
path: root/inc/image.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/image.inc.php')
-rw-r--r--inc/image.inc.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/image.inc.php b/inc/image.inc.php
index 2c0ec74..5b8f077 100644
--- a/inc/image.inc.php
+++ b/inc/image.inc.php
@@ -9,6 +9,16 @@ class Image
return false;
return Database::exec('DELETE FROM image WHERE ownerid = :userid', array('userid' => $userid));
}
+
+ public static function getImageCount($login)
+ {
+ $ret = Database::queryFirst('SELECT Count(*) AS cnt FROM image '
+ . ' INNER JOIN user ON (image.ownerid = user.userid) '
+ . ' WHERE user.login = :login', array('login' => $login));
+ if ($ret === false)
+ return 0;
+ return $ret['cnt'];
+ }
}