Skip to content

Commit

Permalink
Merge pull request #2653 from LibreSign/backport/2651/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: prevent error when current user don't have an email
  • Loading branch information
vitormattos authored Apr 2, 2024
2 parents dcb4564 + 99c4780 commit 1abe822
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Controller/IdentifyAccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1abe822

Please sign in to comment.