pencilblue / pencilblue

Business class content management for Node.js (plugins, server cluster management, data-driven pages)
https://pencilblue.org
GNU General Public License v3.0
1.57k stars 286 forks source link

Unable to resend password reset emails #1248

Open dukeofsussex opened 7 years ago

dukeofsussex commented 7 years ago

Description: At https://github.com/pencilblue/pencilblue/blob/master/plugins/pencilblue/controllers/actions/admin/users/send_password_reset.js#L76 a check is being made using user_id, but the initial document is being added using userId (https://github.com/pencilblue/pencilblue/blob/master/plugins/pencilblue/controllers/actions/admin/users/send_password_reset.js#L83), causing the check to fail and a duplicate error to be thrown when trying to resend the password reset email, as a duplicate document is being inserted. The change is simple and I've confirmed it works, but here's the tricky part: Are you going with userId or user_id?

Steps to Reproduce:

PencilBlue Version: 0.8

Node.js Version: 4.4.7

Environment Description: Win

brianhyder commented 7 years ago

There was an issue close to this not too long ago. The goal was to update to userId and remove the underscore. Happy to merge a fix if you've got it

HarshitS01 commented 4 months ago

Can we close this issue if it is resolved?