Skip to content

Commit dcca860

Browse files
committed
fix: validate the email address when is searching by account
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 501a139 commit dcca860

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/Controller/IdentifyAccountController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ private function addHerselfAccount(array $return, string $search): array {
161161
return $return;
162162
}
163163
$user = $this->userSession->getUser();
164-
if (!str_contains($user->getUID(), $search) && !str_contains(strtolower($user->getDisplayName()), $search)) {
164+
if (!str_contains($user->getUID(), $search)
165+
&& !str_contains(strtolower($user->getDisplayName()), $search)
166+
&& !str_contains($user->getEMailAddress(), $search)
167+
) {
165168
return $return;
166169
}
167170
$filtered = array_filter($return, fn ($i) => $i['id'] === $user->getUID());

0 commit comments

Comments
 (0)