Same issue with sorting.
Only fields in the modUser (i.e. the modx_users table) class key are available for sorting.
Sadly not really the most interesting ones ;-(
Why? Because the modUserProfile class key (i.e. the modx_user_attributes table) is not queried by PeopleGroup (as far as I can see).
Here's what I did.
I made 2 edits in the PeopleGroup (the one with no 's') snippet.
First, after line 59:
/* get users */
$c = $modx->newQuery($userClass);
$c->innerJoin ('modUserProfile','Profile'); /* first: we add the modx_user_attributes table to the query */
$c->innerJoin('modUserGroupMember','UserGroupMembers');
And then after line 67:
$c->select(array(
'Profile.fullname', /* then: we add fullname to the selected fields */
'UserGroupRole.name AS role',
'UserGroupRole.id AS role_id',
));
I don't know if this is the right way to do that, but at least it works for me.
Peoples is a really useful add-on but documentation is... short. What especially confused me was the sortByAlias property. It seems to be the way to tell the add-on to use the class key where your sortBy criteria belongs but it doesn't work (or I missed something). I first tried to pass 'Profile' or 'modUserProfile' to it, but no luck.
So I ended with my edits in the snippet's code.