Hide current user from user search

This commit is contained in:
brantje 2016-09-26 19:20:48 +02:00
parent e789ad4926
commit 46b82a5b1d

View file

@ -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);
} }