You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It is currently not possible to change a customers email address, for the purpose of allowing the customer to login with the new email address. There are two tables - 'customers' & 'users' and only 'customers' ever changes - so in essence changing the login email address is not possible at this time.
When an admin changes a customers email address from the admin customer page -> The customer table is updated but the Users table is not updated. I verified this in the code also, the code only tries to update the Customer table.
If the customer than tries to login with the new email - it does not work.
If I update manually in the database, Users table, the email field to the new email address ( to match the customer table), the user is now able to login.
Go back to admin, update email to something else, example [email protected]
Try to login with new email > Fail. However if you try to login with the old password > success.
This is because the update of the customer only affects the email address in the customers table, not the linked user. Which means that users cannot change their email addresses.
In my server, I did try to change the users table email address manually, after changing in UI the customers table email address, it seems to work with no noticeable side-effects.
The issue is, I am having a hard time creating this new mutation to have the save() method on customer update, to have it also update the user table. I am still learning TypeORM and can't get it to work.
I am certain this affects other users of Vendure, please help :)
Expected behavior
When an admin changes a customer's email address from the admin, the customer should be able to login with the new email address. However, the old email address is still being using by the AUTH - this is because there are two distinct tables that keep track of the users email address - the 'customers' and 'users' tables, however only the 'customers' table changes upon "update".
Environment (please complete the following information):
@vendure/core version: ^1.0.0-beta.8
Nodejs version: v14
Database (mysql/postgres etc): mysql
Additional context
The update logic is found here -
packages\admin-ui\src\lib\customer\src\components\customer-detail\customer-detail.component.ts
In this method -
save()
Therefore I want to update this method by adding code to also update the Users table, to update the user email address there.
The text was updated successfully, but these errors were encountered:
Describe the bug
It is currently not possible to change a customers email address, for the purpose of allowing the customer to login with the new email address. There are two tables - 'customers' & 'users' and only 'customers' ever changes - so in essence changing the login email address is not possible at this time.
When an admin changes a customers email address from the admin customer page -> The customer table is updated but the Users table is not updated. I verified this in the code also, the code only tries to update the Customer table.
If the customer than tries to login with the new email - it does not work.
If I update manually in the database, Users table, the email field to the new email address ( to match the customer table), the user is now able to login.
To Reproduce
Steps to reproduce the behavior:
This is because the update of the customer only affects the email address in the customers table, not the linked user. Which means that users cannot change their email addresses.
In my server, I did try to change the users table email address manually, after changing in UI the customers table email address, it seems to work with no noticeable side-effects.
The issue is, I am having a hard time creating this new mutation to have the save() method on customer update, to have it also update the user table. I am still learning TypeORM and can't get it to work.
I am certain this affects other users of Vendure, please help :)
Expected behavior
When an admin changes a customer's email address from the admin, the customer should be able to login with the new email address. However, the old email address is still being using by the AUTH - this is because there are two distinct tables that keep track of the users email address - the 'customers' and 'users' tables, however only the 'customers' table changes upon "update".
Environment (please complete the following information):
Additional context
The update logic is found here -
packages\admin-ui\src\lib\customer\src\components\customer-detail\customer-detail.component.ts
In this method -
save()
Therefore I want to update this method by adding code to also update the Users table, to update the user email address there.
The text was updated successfully, but these errors were encountered: