summaryrefslogtreecommitdiffstats
path: root/app/class
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-05-22 16:59:43 -0400
committerMalf Furious <m@lfurio.us>2016-05-22 16:59:43 -0400
commitabd11313d0a9f2b28d7b709fcbd98befd95db15c (patch)
tree152db15fb227134a48fa54d4696f0069bf651d62 /app/class
parentd431ef2954455ad38454d27f5be866061794b4bf (diff)
parent2d1e4242a87b54578e24546dabe1525a014da24e (diff)
downloadscrott-abd11313d0a9f2b28d7b709fcbd98befd95db15c.tar.gz
scrott-abd11313d0a9f2b28d7b709fcbd98befd95db15c.zip
Merge branch 'feature/user-removal' into dev
Diffstat (limited to 'app/class')
-rw-r--r--app/class/user.class.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php
index 1d17dfe..07bd0d6 100644
--- a/app/class/user.class.php
+++ b/app/class/user.class.php
@@ -75,6 +75,16 @@ class User extends Object
}
/*
+ * Get the number of administrative accounts in the system
+ */
+ function getNumAdmins()
+ {
+ $query = "SELECT count(*) as cnt FROM user WHERE admin = 1";
+ $results = $this->db->query($query);
+ return $results[0]['cnt'];
+ }
+
+ /*
* Check whether a given username is currently in use
*/
function usernameInUse($username)