1

I know this question may be asked multiple times but I am not able to get the User object in its entirity. The problem is that the user object returns only the username, email and the phone number properties while I have certain fields added like first name and last name to the user object.

I'd like to know if there's a way to get the user object in its entirity

The object on parse cloud should look like

User: 
{
    "firstname": "firstname",
    "lastname": "lastname",
    "username": "username",
    "email": "[email protected]",
    "phone": "0123456789",
    "type": "admin/super-admin/user"
}

I use following query to get the object

var query = new Parse.Query(Parse.User);
query.equalTo("username", "username"); // Whatever be the username passed by search string
query.find({
    success: function (user) {
        console.log("Success:", user)

    },
    error: function (error) {
        //Show if no user was found to match
    }
});

I get the user object as follows:

user:{
    createdAt:"2014-12-27T07:16:09.826Z"
    email: "[email protected]"
    objectId: "223tch5S6J"
    phone: "0123456789"
    updatedAt: "2014-12-27T07:16:09.826Z"
    username: "username"
}

I do not get the other properties like type, firstname, lastname.

Note: I do not need to get the password which parse does not provide anyways so that's not the problem here.

1
  • Your code looks correct. Are you sure that the object on the cloud looks like that? I noticed you are using the phrase 'should look' and I also noticed that the email in the result differs from the email you mentioned. Commented Jan 5, 2015 at 10:35

1 Answer 1

3

user.attributes should hold all the user attributes saved server side

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.