mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-11 05:56:15 +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);
|
$usersTmp = $this->userManager->searchDisplayName($search, $this->limit, $this->offset);
|
||||||
|
|
||||||
foreach ($usersTmp as $user) {
|
foreach ($usersTmp as $user) {
|
||||||
$users[] = array(
|
if($this->userId != $user->getUID()) {
|
||||||
'text' => $user->getDisplayName(),
|
$users[] = array(
|
||||||
'uid' => $user->getUID(),
|
'text' => $user->getDisplayName(),
|
||||||
'type' => 'user'
|
'uid' => $user->getUID(),
|
||||||
);
|
'type' => 'user'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->result = array_merge($this->result, $users);
|
$this->result = array_merge($this->result, $users);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue