From 1c7e3818588d12a2ea098eef6446bc2564a0c5fd Mon Sep 17 00:00:00 2001 From: provokateurin Date: Tue, 26 May 2026 09:46:03 +0200 Subject: [PATCH] refactor(MailPlugin): Continue execution after extracting email instead of calling itself Signed-off-by: provokateurin --- lib/private/Collaboration/Collaborators/MailPlugin.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php index a69f6727f05..4aa9f313e2a 100644 --- a/lib/private/Collaboration/Collaborators/MailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailPlugin.php @@ -67,9 +67,8 @@ class MailPlugin implements ISearchPlugin { } // Extract the email address from "Foo Bar " and then search with "foo.bar@example.tld" instead - $result = preg_match('/<([^@]+@.+)>$/', $search, $matches); - if ($result && filter_var($matches[1], FILTER_VALIDATE_EMAIL)) { - return $this->search($matches[1], $limit, $offset, $searchResult); + if (preg_match('/<([^@]+@.+)>$/', $search, $matches) && filter_var($matches[1], FILTER_VALIDATE_EMAIL)) { + $search = $matches[1]; } $currentUserId = $this->userSession->getUser()->getUID();