Skip to content

request.user.id fails in User afterSave when user is new #712

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

Closed
jiawenzhang opened this issue Feb 28, 2016 · 1 comment
Closed

request.user.id fails in User afterSave when user is new #712

jiawenzhang opened this issue Feb 28, 2016 · 1 comment

Comments

@jiawenzhang
Copy link

the following cloud code fails at request.user.id when the user is new
it works when the user already exists.

Parse.Cloud.afterSave(Parse.User, function(request) {

var userId = request.user.id // fails
console.log("User saved, userId: " + userId);

}
@jiawenzhang
Copy link
Author

As suggested in #384
we can use request.object.id in _User afterSave hook

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

2 participants