It really depends on what sort of criteria you want to search on, but you can query PFUser
s just like you would any other PFObject
within Parse. The only difference is that you create your query with the +[PFUser query]
method. Here's an example from Parse's documentation:
PFQuery *query = [PFUser query];
[query whereKey:@"gender" equalTo:@"female"]; // find all the women
NSArray *girls = [query findObjects];
You can also query where a user is an associated object on some other class in Parse, and you can also handle results asynchronously:
PFQuery *query = [PFQuery queryWithClassName:@"Post"];
[query whereKey:@"user" equalTo:user];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
// do something with results
}];
Check out the query documentation for other examples of the sorts of things you can do with queries.