Display and sort users by 'createdon' date with Peoples Extra

Is it possible to display and sort users by ‘createdon’ date with Peoples Extra?

Yes, this should be possible.

There exist the properties &sortBy and &sortDir for the snippet Peoples.

Take a look at the documentation:


I tried using the code below, however, the createdon is inaccurate and displays the same date/time for every user.

[[Peoples? &limit=`0` &active=`1` &usergroups=`Icon` &sortBy=`createdon` &where=`{"createdon:>=":"2023-08-13"}` &tpl=`users-icons-csv-tpl` &toPlaceholder=`active-icons`]]

I don’t think the createdon field is available as a placeholder in the chunk “users-icons-csv-tpl”.
But you should still be able to sort by it.

Only these fields are selected:

I don’t think that works. createdon is a timestamp field (a number) in the database.

Using an epoch timestamp for the where clause worked! Thank you so much! I have put in a feature request on github in order to be able to use the createdon date/time as a placeholder in the template chunk.

As it’s unlikely that this feature will be added soon, I’d recommend duplicating the snippet Peoples and adding createdon to the array yourself (in the line that I highlighted in the post above).

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.