Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptance link issue when the same mail address due to a case-sensitive error. #1031

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/apigee_edge_teams/src/Entity/TeamInvitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra ; at the end of the line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

$user = user_load_by_mail($recipientEmail);
Copy link
Contributor

@mxr576 mxr576 Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loading user approach looks quite expensive and if the email server case sensitive then it could also lead to problems.

Case sensitivity is a delicate topic anyway...

https://www.googlecloudcommunity.com/gc/Apigee/Apigee-Edge-to-Apigee-X-migration-INVALID-ARGUMENT-email-address/m-p/641748/highlight/true#M77284

return $user ? $user->getEmail() : $recipientEmail;
}

/**
Expand Down
Loading