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

Loopback PUT Request turn emailVerified to "false" #3059

Closed
2 tasks
ishansan38 opened this issue Dec 30, 2016 · 7 comments
Closed
2 tasks

Loopback PUT Request turn emailVerified to "false" #3059

ishansan38 opened this issue Dec 30, 2016 · 7 comments

Comments

@ishansan38
Copy link

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

I tried a Put request with Loopback Explorer - it turns emailVerified to false, and thats why I am unable to login user.

Link to sample repo to reproduce issue (if bug)

Expected result

Should remain True

Actual result (if bug)

Additional information (Node.js version, LoopBack version, etc)

@rusackas
Copy link

rusackas commented Jan 3, 2017

Experiencing the same problem here. We have an admin tool that sets emailVerified to true via a pot request, but it stopped working.

@benbrown
Copy link

benbrown commented Jan 4, 2017

This appears to be caused by a change in v2.36.2, which is attempting to set emailVerified to false when a user changes their email address.

This should ONLY happen when the email address actually changes, not ANY time a user record is modified!

@gaecer
Copy link

gaecer commented Jan 5, 2017

It doesn't, this happen any change you do in the User's model.
I've fixed it changing user.js at line 863:
// return data.email != ctx.data.email; original
return ctx.data.email && data.email != ctx.data.email; //fix

@rusackas
Copy link

rusackas commented Jan 5, 2017

Temporary workaround for those in need:
With any PUT to the User model, you can include the existing/current email address, and it will save everything else correctly without invalidating the email.

@davidcheung
Copy link
Contributor

this bug should be fixed in #3053 or in (2.x) #3072, please ping me in this thread if issue persists to reopen. Closing now.

@gaecer
Copy link

gaecer commented Jan 10, 2017 via email

@dancingshell
Copy link

tl;dr... was/is this an issue for loopback 3.x.x?

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

No branches or pull requests

6 participants