-
- 24,544 Posts
Glad to hear it.
-
- 78 Posts
Hi Bob,
i tried a lot of things (as you read in one of my other threads). But now i am at the point where my customer would like to sort the results by extended user fields :/
Thats why i was thinking about classExtender.
One Question is important for me: is it possible to set a limit? That i can use the GetExtUsers Snippet with getPage?
-
- 5,888 Posts
GetExtUsers seems not to have a limit - property.
But you could use for example migxLoopCollection from MIGX to list the users with getPage
-
- 24,544 Posts
It doesn't, but it's easy to add.
Add the second line here around line 63:
$sortDir = $modx->getOption('sortdir', $sp, 'ASC'); // this should already be there
$limit = $modx->getOption('limit', $sp, 'null', true);
Then add this code around line 69 (just after the $c->where() line):
if ($limit !== null) {
$c->limit($limit);
}