diff options
Diffstat (limited to 'lib/private/Collaboration/Collaborators/UserPlugin.php')
-rw-r--r-- | lib/private/Collaboration/Collaborators/UserPlugin.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 86a55aa428f..ad677703547 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -83,6 +83,8 @@ class UserPlugin implements ISearchPlugin { } } + $this->takeOutCurrentUser($users); + if (!$this->shareeEnumeration || sizeof($users) < $limit) { $hasMoreResults = true; } @@ -146,4 +148,13 @@ class UserPlugin implements ISearchPlugin { return $hasMoreResults; } + + public function takeOutCurrentUser(array &$users) { + $currentUser = $this->userSession->getUser(); + if(!is_null($currentUser)) { + if (isset($users[$currentUser->getUID()])) { + unset($users[$currentUser->getUID()]); + } + } + } } |