2

This thread is somewhat similar to: Saving attributes on a user fetched from a query (i.e. not on the currentUser)

We have this CloudCode:

Parse.Cloud.define('fillArrays', function(request, response) {
    var userId = request.params.userId,
        mails = request.params.mails;
        names = request.params.names;

    var User = Parse.Object.extend('_User'),
        user = new User({ objectId: userId });

    user.set('mailsOfContacts', mails);
    user.set('nameOfContacts', names);


    Parse.Cloud.useMasterKey();
    user.save().then(function(user) {
         response.success(user);
     }, function(error) {
         response.error(error)
     });
 });

Since we use: Parse.Cloud.useMasterKey(); everything should run smoothly, but instead I get: {"code":201,"message":"missing user password"}.

Even if the user I try to modify is the one I am currently logged in with, by the way. Could anybody help me with the issue I'm having?

I would like to add that this error is produced when calling the cloudCode ONLY from the PHP WebApp which uses the standard php sdk, and not when called from the iOS app.

Community
  • 1
  • 1
thms0
  • 494
  • 1
  • 7
  • 15
  • I would like to add that this error is produced when calling the cloudCode ONLY from the PHP WebApp which uses the standard php sdk, and not when called from the iOS app. – thms0 Feb 17 '15 at 15:38

0 Answers0