summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-05-22 14:37:37 -0400
committerFrederic Guillot <fred@kanboard.net>2017-05-22 14:37:37 -0400
commitf16ac8cd66b107f04db78a70521a959eca85159a (patch)
tree43c958a08daab98d671e2422d338da3fd0a834a9 /app
parente8c83c97d7f1fa9028fac9dc44f94959349ca074 (diff)
Show only active users in auto-complete forms
Diffstat (limited to 'app')
-rw-r--r--app/Controller/UserAjaxController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Controller/UserAjaxController.php b/app/Controller/UserAjaxController.php
index 17567a00..37c09b8a 100644
--- a/app/Controller/UserAjaxController.php
+++ b/app/Controller/UserAjaxController.php
@@ -22,7 +22,11 @@ class UserAjaxController extends BaseController
{
$search = $this->request->getStringParam('term');
$filter = $this->userQuery->withFilter(new UserNameFilter($search));
- $filter->getQuery()->asc(UserModel::TABLE.'.name')->asc(UserModel::TABLE.'.username');
+ $filter->getQuery()
+ ->eq(UserModel::TABLE.'.is_active', 1)
+ ->asc(UserModel::TABLE.'.name')
+ ->asc(UserModel::TABLE.'.username');
+
$this->response->json($filter->format($this->userAutoCompleteFormatter));
}