diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 3566abf0a0506..2096ec4621ef6 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -113,9 +113,9 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) { $userEmail = $user->getEMailAddress(); $uid = (string) $uid; if ( - strtolower($uid) === $lowerSearch || + $lowerSearch !== '' && (strtolower($uid) === $lowerSearch || strtolower($userDisplayName) === $lowerSearch || - strtolower($userEmail) === $lowerSearch + strtolower($userEmail) === $lowerSearch) ) { if (strtolower($uid) === $lowerSearch) { $foundUserById = true;