summaryrefslogtreecommitdiffstats
path: root/app/class/user.class.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/class/user.class.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php
index 8ef91ae..6004dc9 100644
--- a/app/class/user.class.php
+++ b/app/class/user.class.php
@@ -25,6 +25,22 @@ class User extends Object
parent::__construct("user", $cols);
$this->loadObj($guid);
}
+
+ /*
+ * Get all users -- ordered by name, ascending
+ */
+ function getAllUsers_orderByName()
+ {
+ $query = "SELECT guid FROM `object` WHERE `type` = 'user' ORDER BY name";
+ $result = $this->db->query($query);
+
+ $users = array();
+
+ foreach ($result as $u)
+ $users[] = new User($u['guid']);
+
+ return $users;
+ }
}
?>