diff options
author | Malf Furious <m@lfurio.us> | 2017-02-06 01:18:10 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2017-02-06 01:18:10 -0500 |
commit | 476192ca8fa2053af74a7e7f5e4006c83c8d0cad (patch) | |
tree | 69c73b211da59924a19a89d45e45d1e9692b5385 /app/class/user.class.php | |
parent | 56a6dda13bb85b25f590fc8a64535bb53c3c2fd2 (diff) | |
download | scrott-476192ca8fa2053af74a7e7f5e4006c83c8d0cad.tar.gz scrott-476192ca8fa2053af74a7e7f5e4006c83c8d0cad.zip |
Update table class tree to use static database references
Diffstat (limited to '')
-rw-r--r-- | app/class/user.class.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php index fc969fa..45fa5a5 100644 --- a/app/class/user.class.php +++ b/app/class/user.class.php @@ -47,10 +47,10 @@ class user extends agent */ public static function getGuidByUname(string $uname) : ?string { - $uname = $this->db->esc($uname); + $uname = database::esc($uname); $query = "SELECT guid FROM objects WHERE objtype = 'user' AND name = '" . $uname . "'"; - $res = $this->db->query($query); + $res = database::query($query); if (count($res) == 0) return NULL; @@ -77,7 +77,7 @@ class user extends agent public static function getAll_ordByUname() : array { $query = "SELECT guid FROM objects WHERE objtype = 'user' ORDER BY name"; - $res = $this->db->query($query); + $res = database::query($query); $users = array(); @@ -95,7 +95,7 @@ class user extends agent { $query = "SELECT o.guid FROM objects o JOIN users u ON o.guid = u.guid " . "WHERE o.objtype = 'user' ORDER BY u.admin DESC, o.name"; - $res = $this->db->query($query); + $res = database::query($query); $users = array(); @@ -112,7 +112,7 @@ class user extends agent { $query = "SELECT o.guid FROM objects o JOIN users u ON o.guid = u.guid " . "WHERE o.objtype = 'user' AND u.admin = 1 ORDER BY o.name"; - $res = $this->db->query($query); + $res = database::query($query); $users = array(); |