mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-10 21:46:25 +08:00
Hide current user from user search
This commit is contained in:
parent
e789ad4926
commit
46b82a5b1d
1 changed files with 7 additions and 5 deletions
|
@ -56,11 +56,13 @@ class ShareController extends ApiController {
|
|||
$usersTmp = $this->userManager->searchDisplayName($search, $this->limit, $this->offset);
|
||||
|
||||
foreach ($usersTmp as $user) {
|
||||
$users[] = array(
|
||||
'text' => $user->getDisplayName(),
|
||||
'uid' => $user->getUID(),
|
||||
'type' => 'user'
|
||||
);
|
||||
if($this->userId != $user->getUID()) {
|
||||
$users[] = array(
|
||||
'text' => $user->getDisplayName(),
|
||||
'uid' => $user->getUID(),
|
||||
'type' => 'user'
|
||||
);
|
||||
}
|
||||
}
|
||||
$this->result = array_merge($this->result, $users);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue