diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-21 18:51:59 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-21 18:51:59 -0400 |
commit | 2c056bb9bbfd22c7c2225964d994c79a60b7f64d (patch) | |
tree | f68c0f3f503ba4fd199eed2aee2cb201a1cc3a62 /app/Model/User.php | |
parent | 88a1120d9b4fde8b3e8cddad6d2be3cdd9fbf806 (diff) |
Add option to allow everybody on a project
Diffstat (limited to 'app/Model/User.php')
-rw-r--r-- | app/Model/User.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/Model/User.php b/app/Model/User.php index 33bd6720..9544f3c9 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -151,7 +151,18 @@ class User extends Base public function getList() { $users = $this->db->table(self::TABLE)->columns('id', 'username', 'name')->findAll(); + return $this->prepareList($users); + } + /** + * Common method to prepare a user list + * + * @access public + * @param array $users Users list (from database) + * @return array Formated list + */ + public function prepareList(array $users) + { $result = array(); foreach ($users as $user) { |