lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

camelCased email addresses breaking registration on checkout #599

Closed mjvotaw closed 10 years ago

mjvotaw commented 10 years ago

A client found this last week: basically, if you attempt to register with a camelCased email address (like johnDoe@gmail.com), the registration succeeds, but the authentication prior to finishing checkout fails. The user is registered with a lowercased email address, but then the authentication attempt uses the original. This happens in CartController->actionCheckout() around lines 527-540.

The naive solution is just to wrap $model->contactEmail in strtolower() when passing it to new UserIdentity, but I think that if the registration process forces the email address to lowercase at some point, the authentication process should always as well.

I'd be more than happy to setup a pull request for this, but I'm not really sure where the best place to make this change would be (somewhere in UserIdentity, perhaps?).

ktwbc commented 10 years ago

Hi,

Thank you for the report. Actually this has already been fixed in the upcoming release, so the fix should be out shortly. (The change was made in the Customer model with a beforeValidate() function.)