Skip to content

🐛 Bug Report: CreateTeamMembership and providing an email to an anonymous user, calls them by the incorrect name #8825

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

Closed
2 tasks done
pingu2k4 opened this issue Oct 19, 2024 · 9 comments
Assignees
Labels
bug Something isn't working product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.

Comments

@pingu2k4
Copy link

👟 Reproduction steps

  • Create a user on your Appwrite App
  • With said user, create a team
  • With said user, call the CreateTeamMembership endpoint, passing an email address and a name for the invited user
  • Inspect said email
  • Note that the email begins with "Hello Inviter," (where Inviter is the person who invited, not the one receiving the email)

👍 Expected behavior

It should greet the person the email has been sent to, not the person who invited them.

👎 Actual Behavior

Image
In the image here, you can see that this was sent to my email address, and my name there was set as "Your Name" which is what I provided. Inviter was the name of the user that did the inviting, yet is greeted in the email. It then also states that Inviter did the inviting.

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Windows

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@pingu2k4 pingu2k4 added the bug Something isn't working label Oct 19, 2024
@DH-555 DH-555 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Oct 25, 2024
@Kraftsman1
Copy link

Hello @stnguyen90 what's the status of this issue?

I'd love to pick it up and work on.

@Kraftsman1
Copy link

Thanks @Meldiron

@DH-555 DH-555 added the good first issue Good for newcomers label Nov 11, 2024
@asharan2buff
Copy link

Can I take this up if no one is working on it?

@Kraftsman1
Copy link

@asharan2buff I'm working on it atm. I'll be a making a PR soon

@ChiragAgg5k
Copy link
Member

@Kraftsman1 are you still working on it?

@stnguyen90
Copy link
Contributor

Related community thread: https://discord.com/channels/564160730845151244/1327754291468832880

@callmetushar123
Copy link

Hi, can you please locate me the code where the changes are expected, I am new to this repo. Will help a ton

@ChiragAgg5k
Copy link
Member

Here is the code that should be changed:

'user' => $user->getAttribute('name'),

It should instead be $name, which if empty is defaulted to email above.

$emailVariables = [
                    'owner' => $user->getAttribute('name'),
                    'direction' => $locale->getText('settings.direction'),
                    /* {{user}}, {{team}}, {{redirect}} and {{project}} are required in default and custom templates */
                    'user' => $name,
                    'team' => $team->getAttribute('name'),
                    'redirect' => $url,
                    'project' => $projectName
              ];

cc @stnguyen90

@stnguyen90 stnguyen90 self-assigned this Jan 16, 2025
@stnguyen90 stnguyen90 removed the good first issue Good for newcomers label Jan 16, 2025
@stnguyen90 stnguyen90 assigned ChiragAgg5k and unassigned stnguyen90 Jan 16, 2025
@stnguyen90 stnguyen90 mentioned this issue Jan 16, 2025
2 tasks
@ChiragAgg5k
Copy link
Member

Fixed in the PR here - #9218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
Status: Done
Development

No branches or pull requests

7 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy