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

Conversation

vpa24
Copy link

@vpa24 vpa24 commented Jan 26, 2024

When inviting a new member to my team, consider the following example: the user's email is [email protected], but I entered [email protected]. When they click on the acceptance link, they can't join the team due to a case-sensitive error.

In my code, it first retrieves the user object using the user_load_by_mail function with the recipient's email. If the user object is found, it retrieves the original user's email; otherwise, it obtains the recipient's email.

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.37%. Comparing base (e22b578) to head (701ba31).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                3.x    #1031   +/-   ##
=========================================
  Coverage     44.37%   44.37%           
  Complexity     3041     3041           
=========================================
  Files           342      342           
  Lines         11111    11111           
=========================================
  Hits           4931     4931           
  Misses         6180     6180           

@@ -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

@@ -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);
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

@kedarkhaire kedarkhaire force-pushed the vpa24-acceptance-link-problem-with-mixed-case-email-addresss branch from 5eb0f8c to 701ba31 Compare June 18, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants