I would like to change the default sort order of users in the CB User Manager component. Currently it lists users in ascending order by user ID, but I would like to change it to a custom field that I've created.
I'm playing with the showUsers() function in the controller.users.php file but not having any luck. Any help or direction would be appreciated!
I'm sure this isn't the best way to do it, but I figured it out if anyone else is interested. On line ~250 of controller.users.php, you'll find the query that executes to provide the user listing. I simply added the ORDER BY clause at the end of the query:
Code:
$_CB_database->setQuery( $query." ORDER BY cb_studioname ASC", (int) $pageNav->limitstart, (int) $pageNav->limit );
In the CB list management you can click on the list that you are wanting to sort. then about halfway down the screen you will see "Sort". you have to select the sort criteria from there. For instance,
username, ASC
allen
Bill
Carl