diff options
author | Malf Furious <m@lfurio.us> | 2016-05-22 16:59:43 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-05-22 16:59:43 -0400 |
commit | abd11313d0a9f2b28d7b709fcbd98befd95db15c (patch) | |
tree | 152db15fb227134a48fa54d4696f0069bf651d62 /app/class/user.class.php | |
parent | d431ef2954455ad38454d27f5be866061794b4bf (diff) | |
parent | 2d1e4242a87b54578e24546dabe1525a014da24e (diff) | |
download | scrott-abd11313d0a9f2b28d7b709fcbd98befd95db15c.tar.gz scrott-abd11313d0a9f2b28d7b709fcbd98befd95db15c.zip |
Merge branch 'feature/user-removal' into dev
Diffstat (limited to 'app/class/user.class.php')
-rw-r--r-- | app/class/user.class.php | 10 |
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) |