diff options
-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) |