mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 02:00:51 -04:00
refactor(MailPlugin): Continue execution after extracting email instead of calling itself
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
d92aac8f7d
commit
1c7e381858
1 changed files with 2 additions and 3 deletions
|
|
@ -67,9 +67,8 @@ class MailPlugin implements ISearchPlugin {
|
|||
}
|
||||
|
||||
// Extract the email address from "Foo Bar <foo.bar@example.tld>" 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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue