-
Notifications
You must be signed in to change notification settings - Fork 13
Description
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@gmail.com",
"attending": false,
"__type__": "user",
"first": "FirstName",
"last": "LastName",
"__account__": {
"email": "email@gmail.com",
"username": "username"
}
}