简体   繁体   中英

Update user object in parse.com

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();
      }
       });

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);

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