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

Handle registration for exist customer #546

Merged

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Sep 18, 2019

Closes #533

This would handle the registration process like Standard Sylius that a Customer is set to the User if the E-Mail Address exist as a customer. Currently you are not able to register if you did an anonymous order over the shop api.

@alexander-schranz alexander-schranz requested a review from a team as a code owner September 18, 2019 13:25
@mamazu
Copy link
Member

mamazu commented Sep 18, 2019

What happens if I enter an already existing email can I change the whole customer with that. This would mean I can just "register" with my friends email address and take over his account.

@alexander-schranz
Copy link
Contributor Author

@mamazu like in Sylius you first need to click on the Confirmation Link in the email to enable the new created account so without access to the Email account you will not be able to login or see anything in this account.

@robmeek
Copy link

robmeek commented Sep 20, 2019

@alexander-schranz
I’m doing this same thing in my app.
But might it be better not to change any fields on the customer entity if the customer exists – so you put $customer->setFirstName etc inside the conditional.
– otherwise, while you might not be able to hijack an account because of the confirmation email, you could easily change one’s name.

@alexander-schranz
Copy link
Contributor Author

@robmeek Thats a good point! Sadly this is what sylius currently also does when you do it over the normal sylius standard UI I think this should then also be changed there.

//cc @lchrusciel

@lchrusciel
Copy link
Member

Totally makes sense to add this behavior. As close as possible to Sylius I would say. It could be considered as a bug even.

@lchrusciel lchrusciel added the Bug label Sep 22, 2019
@lchrusciel lchrusciel force-pushed the bugfix/register-exist-customer branch 2 times, most recently from fc35642 to 271f968 Compare September 22, 2019 09:44
@lchrusciel
Copy link
Member

Fixes #533

@mamazu mamazu merged commit dc57704 into Sylius:master Sep 22, 2019
@mamazu
Copy link
Member

mamazu commented Sep 22, 2019

Thanks, Alexander! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

500 error when registering with exist email address
4 participants