diff --git a/lib/Controller/IdentifyAccountController.php b/lib/Controller/IdentifyAccountController.php index 5f65ee38cb..3926a9c41b 100644 --- a/lib/Controller/IdentifyAccountController.php +++ b/lib/Controller/IdentifyAccountController.php @@ -151,6 +151,9 @@ private function addHerselfEmail(array $return, string $search): array { return $return; } $user = $this->userSession->getUser(); + if (empty($user->getEMailAddress())) { + return $return; + } if (!str_contains($user->getEMailAddress(), $search) && !str_contains($user->getDisplayName(), $search)) { return $return; }