diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 3566abf0a0..2096ec4621 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -113,9 +113,9 @@ class UserPlugin implements ISearchPlugin { $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;