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 2 commits 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 hello_Word@example.com, but I entered Hello_word@example.com. 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.20%. Comparing base (0f0e59a) to head (51a9b1b).

❗ Current head 51a9b1b differs from pull request most recent head 5eb0f8c. Consider uploading reports for the commit 5eb0f8c to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #1031      +/-   ##
============================================
- Coverage     44.33%   44.20%   -0.13%     
+ Complexity     3033     3029       -4     
============================================
  Files           341      341              
  Lines         11094    11086       -8     
============================================
- Hits           4918     4901      -17     
- Misses         6176     6185       +9     
Files Coverage Δ
...es/apigee_edge_teams/src/Entity/TeamInvitation.php 86.91% <100.00%> (ø)

... and 10 files with indirect coverage changes

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

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

3 participants