Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.

User, Product Classes returning nothing. #63

Closed
thedangler opened this issue Jan 14, 2013 · 4 comments
Closed

User, Product Classes returning nothing. #63

thedangler opened this issue Jan 14, 2013 · 4 comments

Comments

@thedangler
Copy link

I don't know if this is happening to everyone or just me, but I am having trouble getting results back from the User class. It always returns nothing.

$query = new parseQuery("Email");
$query->where('serialized_data',$_GET['id']);
$result = $query->find();
print_r($result); // returns proper result

$query_user = new parseQuery("User");
$query_user->where('objectId',"kHnpx7lBmF");
print_r($query_user->find()); // returns nothing. Should return the User

I've checked the objectId 10 times, the information is correct.
the User Class doesn't have any ACL on it either.

Is there something i'm missing?

@thedangler
Copy link
Author

No one has this problem?

@andrewscofield
Copy link
Owner

Sorry I'm just now seeing this. Try updating your code to this:

$query_user = new parseQuery('users');
$query_user->where('objectId',"kHnpx7lBmF");
print_r($query_user->find());

The difference being 'users' versus 'User' when initializing the query object.

Let me know if that works.

@thedangler
Copy link
Author

Does this user the User class in parse or does it make a new classes called
users?

On Wed, Feb 20, 2013 at 2:08 AM, apotropaic notifications@github.comwrote:

Sorry I'm just now seeing this. Try updating your code to this:

$query_user = new parseQuery('users');
$query_user->where('objectId',"kHnpx7lBmF");
print_r($query_user->find());

The difference being 'users' versus 'User' when initializing the query
object.

Let me know if that works.


Reply to this email directly or view it on GitHubhttps://github.com//issues/63#issuecomment-13818861.

@andrewscofield
Copy link
Owner

It causes the API call to go to /1/users instead of /1/classes/user like it was doing when were excluding the 's'

Hope that makes sense.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants