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

Parse-server 2.1.7 - request.user returns null/undefined #1619

Closed
benishak opened this issue Apr 25, 2016 · 5 comments
Closed

Parse-server 2.1.7 - request.user returns null/undefined #1619

benishak opened this issue Apr 25, 2016 · 5 comments

Comments

@benishak
Copy link
Contributor

I have a cloud afterSave/ ... function that is being called by the user from the App, inside the function I call

var currentUser = request.user;

but it returns undefined

On Parse.com I used Parse.User.currrent() which worked perfectly

@drew-gross
Copy link
Contributor

We have lots of passing test cases that cover these features. Can you post some code that reliably reproduces your issue? Ideally as a test case we can add to our test suite.

@benishak
Copy link
Contributor Author

in AfterSave
a User comment or like, the record is saved in the collection, afterSaving it, afterSave will read the record and send push notification ... etc, inside the afterSave I call request.user which returns null. the record contains a column called "fromUser" so right now i'm using currentUser = request.object.get("fromUser");

@benishak
Copy link
Contributor Author

maybe request.user works only on the _User class ?

@hramos
Copy link
Contributor

hramos commented Apr 26, 2016

request.user will only point to a _User object when the function is triggered by an authenticated user.

Can you post some code that demonstrates the issue?

Please refer to this issue for an example of a great bug report.

@RafaRuiz
Copy link

Hi @hramos please take a look to #775. I wrote the whole code I'm using and still there's an issue

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

4 participants