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

Bug fix on update account. #12

Closed
wants to merge 1 commit into from
Closed

Bug fix on update account. #12

wants to merge 1 commit into from

Conversation

cyrilf
Copy link

@cyrilf cyrilf commented Feb 15, 2013

When a user updates his account settings (in /home) there was a bug which destroyed the "session.user".

Fix
Use accounts.findAndModify instead of accounts.save because findAndModify is like save, but it also gives the updated document to your callback.

This way, the problem (from line 69 in router.js) is solved. (more infos here: Node-MongoDB - Find and modify )

Hope it helps.

@vit-lebediev
Copy link
Contributor

Hi !
My pull-request fixes this issue without changing the function of use, and with less code.

@braitsch braitsch closed this in 07c99c0 Nov 18, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants