Reputation: 4150
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();
}
});
Upvotes: 2
Views: 5044
Reputation: 9845
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);
Upvotes: 4