summaryrefslogtreecommitdiff
path: root/app/Controller/UserHelper.php
blob: f164d0a6cd695e0c878969f6ed9a37608900694e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Kanboard\Controller;

/**
 * User Helper
 *
 * @package  controller
 * @author   Frederic Guillot
 */
class UserHelper extends Base
{
    /**
     * User autocompletion (Ajax)
     *
     * @access public
     */
    public function autocomplete()
    {
        $search = $this->request->getStringParam('term');
        $users = $this->userFilterAutoCompleteFormatter->create($search)->filterByUsernameOrByName()->format();
        $this->response->json($users);
    }
}