2

how can i update the user object in parse?i know must be logged with the user to modify itself for security reason. This is my code but don't works :POST https://api.parse.com/1/classes/_User/xj3QLLYy07 400 (Bad Request)

      var user = Parse.User.current();
      console.log(user);

      user.save(null, {
      success: function(user) {

      user.set("email", "pty");

      user.save();
      }
       });

1 Answer 1

4

For the Parse.User object, you need to explicitly set the email address like this (see the API documentation):

var user = Parse.User.current();
user.setEmail("email", options);
Sign up to request clarification or add additional context in comments.

3 Comments

@Lucas is it possible to exclude options? so user.setEmail("email"); Whats the correct prefix? I dont think I need options for what I'm doing
@Dano007 See parse.com/docs/js/symbols/Parse.User.html#setEmail. I think options is optional.
Thanks, I tried it and it did'nt seem to respond well. I used user.setEmail("email"); is that not correct?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.