diff options
author | Joas Schilling <coding@schilljs.com> | 2021-03-17 09:02:37 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-17 09:51:31 +0100 |
commit | 9a189bc710a971bea5edb4807914a3978356e66b (patch) | |
tree | c9451bc47f58b1eb61459b1d7a7b6006ec65d095 /lib/public/User | |
parent | f82edda9c190462132f5042a177e7fa413291330 (diff) | |
download | nextcloud-server-9a189bc710a971bea5edb4807914a3978356e66b.tar.gz nextcloud-server-9a189bc710a971bea5edb4807914a3978356e66b.zip |
Improve search results when only phonebook-matches can we autocompleted
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/User')
-rw-r--r-- | lib/public/User/Backend/IGetRealUIDBackend.php | 2 | ||||
-rw-r--r-- | lib/public/User/Backend/ISearchKnownUsersBackend.php | 43 |
2 files changed, 44 insertions, 1 deletions
diff --git a/lib/public/User/Backend/IGetRealUIDBackend.php b/lib/public/User/Backend/IGetRealUIDBackend.php index d724426e176..cc290eb6dc0 100644 --- a/lib/public/User/Backend/IGetRealUIDBackend.php +++ b/lib/public/User/Backend/IGetRealUIDBackend.php @@ -33,7 +33,7 @@ interface IGetRealUIDBackend { /** * Some backends accept different UIDs than what is the internal UID to be used. - * For example the database backend accepts differnt cased UIDs in all the functions + * For example the database backend accepts different cased UIDs in all the functions * but the internal UID that is to be used should be correctly cased. * * This little function makes sure that the used UID will be correct hen using the user object diff --git a/lib/public/User/Backend/ISearchKnownUsersBackend.php b/lib/public/User/Backend/ISearchKnownUsersBackend.php new file mode 100644 index 00000000000..89c7a49cd30 --- /dev/null +++ b/lib/public/User/Backend/ISearchKnownUsersBackend.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Joas Schilling <coding@schilljs.com> + * + * @author Joas Schilling <coding@schilljs.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\User\Backend; + +/** + * @since 21.0.1 + */ +interface ISearchKnownUsersBackend { + + /** + * @param string $searcher + * @param string $pattern + * @param int|null $limit + * @param int|null $offset + * @return array + * @since 21.0.1 + */ + public function searchKnownUsersByDisplayName(string $searcher, string $pattern, ?int $limit = null, ?int $offset = null): array; +} |