0

Am I able to add additional values to the new.Parse.User, such as address or hair color? Or are those values reserved just for username, password, email, and phone?

Like so: [Javascript]

var user = new Parse.User();
user.set("username", username);
user.set("email", email);
user.set("password", password);
user.set("address", myaddress);

If not how would you go about doing this? Would you need to create a User Profile Class for ever new user?

1 Answer 1

1

The documentation on retrieving objects should explain this.

You can add any fields you want with the set method.

var user = new Parse.User();

// set the properties of the user
user.set("username", username);
user.set("password", password);
user.set("email", email);

// Create a custom field for the user (there is no limit to the number of custom records)
user.set("score", 0);

// other custom fields could be added like this:
// user.set("user-status", "I am happy");
// user.set("nickname", "super-user");
Sign up to request clarification or add additional context in comments.

Comments

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.