summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorsorbaugh <stephan_orbaugh@hotmail.com>2023-09-13 14:24:32 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-10-12 12:31:42 +0200
commitd657ded9bfb48240c4c1f91cf7d648f57da07eb2 (patch)
tree0d5d7a0a90ecbd840e912317e495a392e8392950 /apps/settings
parent157f2a706281f831128afb79fa87c646bc78f8d2 (diff)
downloadnextcloud-server-d657ded9bfb48240c4c1f91cf7d648f57da07eb2.tar.gz
nextcloud-server-d657ded9bfb48240c4c1f91cf7d648f57da07eb2.zip
Keep Search Provider but remove actual search and display on the searchlist dialog. Will revisit in future search result list in future issue.
Usage: 1. Type a string in the search bar 2. Add in:users filter to avoid unnecessary searches in other apps
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Search/UserSearch.php30
1 files changed, 1 insertions, 29 deletions
diff --git a/apps/settings/lib/Search/UserSearch.php b/apps/settings/lib/Search/UserSearch.php
index 181d8554772..8ae2eeafaa8 100644
--- a/apps/settings/lib/Search/UserSearch.php
+++ b/apps/settings/lib/Search/UserSearch.php
@@ -101,37 +101,9 @@ class UserSearch implements IProvider {
*/
public function search(IUser $user, ISearchQuery $query): SearchResult {
- $users = $this->userManager->search($query->getTerm(), $query->getLimit(), 0);
-
- if (!$this->groupManager->isAdmin($user->getUID())) {
- return SearchResult::complete(
- $this->l->t('Users'),
- []
- );
- }
-
- foreach ($users as $user) {
- $targetUserObject = $this->userManager->get($user->getUid());
-
- if ($targetUserObject === null) {
- throw new OCSNotFoundException('User does not exist');
- }
-
- $userAccount = $this->accountManager->getAccount($targetUserObject);
- $avatar = $userAccount->getProperty(IAccountManager::PROPERTY_AVATAR)->getScope();
-
- $result[] = new SearchResultEntry(
- '',
- $targetUserObject->getDisplayName(),
- $user->getUid(),
- $this->urlGenerator->linkToRouteAbsolute('settings.Users.usersList'),
- 'icon-user-dark'
- );
- }
-
return SearchResult::complete(
$this->l->t('Users'),
- $result
+ []
);
}
}