diff options
-rw-r--r-- | app/Formatter/UserAutoCompleteFormatter.php | 4 | ||||
-rw-r--r-- | doc/plugin-overrides.markdown | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/Formatter/UserAutoCompleteFormatter.php b/app/Formatter/UserAutoCompleteFormatter.php index 32a83608..c81af00a 100644 --- a/app/Formatter/UserAutoCompleteFormatter.php +++ b/app/Formatter/UserAutoCompleteFormatter.php @@ -24,11 +24,11 @@ class UserAutoCompleteFormatter extends BaseFormatter implements FormatterInterf $users = $this->query->columns(UserModel::TABLE.'.id', UserModel::TABLE.'.username', UserModel::TABLE.'.name')->findAll(); foreach ($users as &$user) { - $user['value'] = $user['username'].' (#'.$user['id'].')'; - if (empty($user['name'])) { + $user['value'] = $user['username'].' (#'.$user['id'].')'; $user['label'] = $user['username']; } else { + $user['value'] = $user['name'].' (#'.$user['id'].')'; $user['label'] = $user['name'].' ('.$user['username'].')'; } } diff --git a/doc/plugin-overrides.markdown b/doc/plugin-overrides.markdown index b9372bdf..3b94bd60 100644 --- a/doc/plugin-overrides.markdown +++ b/doc/plugin-overrides.markdown @@ -47,8 +47,8 @@ Formatter Overrides Here an example to override formatter objects in Kanboard: ```php -class MyFormatter extends UserAutoCompleteFormatter { - +class MyFormatter extends UserAutoCompleteFormatter +{ public function format() { $users = parent::format(); |