diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-16 20:55:21 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-16 20:55:21 -0400 |
commit | 4514bc1d4b4abff23902e46da76e70f13a3647eb (patch) | |
tree | fb4f03d47f49bd8acc6fbae943ac44ac58df9540 /app/Controller/UserHelper.php | |
parent | abdf6f97800e7e838b5841820815385b183bab67 (diff) |
Improve user controllers and views
Diffstat (limited to 'app/Controller/UserHelper.php')
-rw-r--r-- | app/Controller/UserHelper.php | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/app/Controller/UserHelper.php b/app/Controller/UserHelper.php deleted file mode 100644 index d5e0920d..00000000 --- a/app/Controller/UserHelper.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -namespace Kanboard\Controller; - -use Kanboard\Filter\UserNameFilter; -use Kanboard\Formatter\UserAutoCompleteFormatter; -use Kanboard\Model\User as UserModel; - -/** - * User Helper - * - * @package controller - * @author Frederic Guillot - */ -class UserHelper extends BaseController -{ - /** - * User auto-completion (Ajax) - * - * @access public - */ - public function autocomplete() - { - $search = $this->request->getStringParam('term'); - $filter = $this->userQuery->withFilter(new UserNameFilter($search)); - $filter->getQuery()->asc(UserModel::TABLE.'.name')->asc(UserModel::TABLE.'.username'); - $this->response->json($filter->format(new UserAutoCompleteFormatter($this->container))); - } - - /** - * User mention auto-completion (Ajax) - * - * @access public - */ - public function mention() - { - $project_id = $this->request->getStringParam('project_id'); - $query = $this->request->getStringParam('q'); - $users = $this->projectPermission->findUsernames($project_id, $query); - $this->response->json($users); - } - - /** - * Check if the user is connected - * - * @access public - */ - public function status() - { - $this->response->text('OK'); - } -} |