Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort option not working with searchUsers method #34

Open
mdhiggins opened this issue Jun 29, 2017 · 0 comments
Open

sort option not working with searchUsers method #34

mdhiggins opened this issue Jun 29, 2017 · 0 comments

Comments

@mdhiggins
Copy link

Trying to run a searchUser query and despite my best efforts I cannot get the results to be sorted.

Sorting works in other areas of the project when querying objects, but seems to fail when searching users (or when retrieving all users).

I've tried the following:
var response = ws.searchUsers(search, {sort: 'last, first', skip: skip, limit: size, count: true});
var response = ws.searchUsers(search, {sort: 'last', skip: skip, limit: size, count: true});
var response = ws.searchUsers(search, {sort: 'last:desc', skip: skip, limit: size, count: true});
var response = ws.searchUsers(search, {sort: 'last'});

Each results is only sorted by what appears to be the date the user was added. Ideally I would like to sort by the last and first fields of the user object.

Here is a sample of the user object I am trying to sort, all user objects have the 'first' and 'last' parameters

{
  "__id__": "idgoeshere",
  "services": null,
  "__class__": "UserCM",
  "email": "[email protected]",
  "attending": false,
  "__type__": "user",
  "first": "FirstName",
  "last": "LastName",
  "__account__": {
    "email": "[email protected]",
    "username": "username"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant