diff --git a/modules/apigee_edge_teams/src/Entity/TeamInvitation.php b/modules/apigee_edge_teams/src/Entity/TeamInvitation.php index ab4dd4843..d8d475133 100644 --- a/modules/apigee_edge_teams/src/Entity/TeamInvitation.php +++ b/modules/apigee_edge_teams/src/Entity/TeamInvitation.php @@ -190,7 +190,9 @@ public function setStatus(int $status): TeamInvitationInterface { * {@inheritdoc} */ public function getRecipient(): ?string { - return $this->get('recipient')->value; + $recipientEmail = $this->get('recipient')->value;; + $user = user_load_by_mail($recipientEmail); + return $user ? $user->getEmail() : $recipientEmail; } /**