From 476192ca8fa2053af74a7e7f5e4006c83c8d0cad Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Mon, 6 Feb 2017 01:18:10 -0500 Subject: Update table class tree to use static database references --- app/class/user.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/class/user.class.php') 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(); -- cgit v1.2.3