I'm creating a new C5 App for the dashboard... as part of the process I need to get a list of available groups (which will be presented to the user) and then use whatever group is selected to ultimately retrieve a list of users in that group... This will all be done from within the dashboard... so what I need help with is...

1. code to retrieve an array of all groups.

2. retrieve an array of all users in a given group.

can anyone point me in the right direction..?

View Replies:
okhayat replied on at Permalink Reply
Your best bet is:
As a quicky:
1. To retrieve a list of groups:
$ga = new GroupSearch();
$groups = $ga->getPage();

2. List of members in a group:
// find the group
$gr = Group::getByID($gID); // OR
$gr = Group::getByName($gName);
// get array of members
$users = $gr->getGroupMembers();

3. Get the count of users in group:
echo $gr->getGroupMembersNum();

* Note: concrete/single_pages/dashboard/users/groups.php is also a nice live example.
JimboJetset replied on at Permalink Reply
.. really appreciate the help...

Remo replied on at Permalink Reply
It's not finsihed but works fine so far:

C5 API as CHM file..