summaryrefslogtreecommitdiff
path: root/app/Controller/UserListController.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-16 20:55:21 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-16 20:55:21 -0400
commit4514bc1d4b4abff23902e46da76e70f13a3647eb (patch)
treefb4f03d47f49bd8acc6fbae943ac44ac58df9540 /app/Controller/UserListController.php
parentabdf6f97800e7e838b5841820815385b183bab67 (diff)
Improve user controllers and views
Diffstat (limited to 'app/Controller/UserListController.php')
-rw-r--r--app/Controller/UserListController.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/Controller/UserListController.php b/app/Controller/UserListController.php
new file mode 100644
index 00000000..685746fb
--- /dev/null
+++ b/app/Controller/UserListController.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Class User List Controller
+ *
+ * @package Kanboard\Controller
+ * @author Frederic Guillot
+ */
+class UserListController extends BaseController
+{
+ /**
+ * List all users
+ *
+ * @access public
+ */
+ public function show()
+ {
+ $paginator = $this->paginator
+ ->setUrl('UserListController', 'show')
+ ->setMax(30)
+ ->setOrder('username')
+ ->setQuery($this->user->getQuery())
+ ->calculate();
+
+ $this->response->html($this->helper->layout->app('user_list/show', array(
+ 'title' => t('Users').' ('.$paginator->getTotal().')',
+ 'paginator' => $paginator,
+ )));
+ }
+}