简体   繁体   中英

Update all user objects in parse

I have added a column in the User class that holds the users score in a game, this is an ios app. I also have a javascript that runs seperate to the app that changes all the users scores based on other variables. I can access the user class via a query and get the variables but if I try

user.save();

if does not work. Is there a different save method I need to use to save the new user details. This cannot be done based off the current user as this javascript changes every user in the User class.

Thanks,

You don't have access to the user object without being signed in, so for anything you need to do with other user objects than your own, you should separate this out to another class.

You CAN circumvent this by using a master key, though. Check this post:

https://parse.com/questions/bypass-acl-on-cloud-code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM