summaryrefslogtreecommitdiff
path: root/app/Model/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/User.php')
-rw-r--r--app/Model/User.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/Model/User.php b/app/Model/User.php
index 5f6b8a3a..19ec0494 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -98,7 +98,17 @@ class User extends Base
*/
public function getList()
{
- return $this->db->table(self::TABLE)->asc('username')->listing('id', 'username');
+ $users = $this->db->table(self::TABLE)->columns('id', 'username', 'name')->findAll();
+
+ $result = array();
+
+ foreach ($users as $user) {
+ $result[$user['id']] = $user['name'] ?: $user['username'];
+ }
+
+ asort($result);
+
+ return $result;
}
/**