Trying to get a list of group names from modx revolution, digging through the API and docs, but not having much luck finding a function that does this.
How can I get a list of groups [names & ids] in a snippet from a modx revolution instance>?
<?php
$where = array();
$userGroups = $modx->getCollection('modUserGroup', $where);
foreach ($userGroups as $userGroup) {
print $userGroup->get('name');
}