How to display users in a group

Permalink
I have registered users in which an administrator assigns groups
How can I get a listing of groups and users.
Ver 5.6.1.2

HOBOcs
View Replies:
SheldonB replied on at Permalink Reply
SheldonB
PM Johnthefish about magicdata in the addons i think he has a symbol for this
bbeng89 replied on at Permalink Reply
bbeng89
You can get users using the UserList model, like so:
Loader::model('user_list');
$ul = new UserList();
$users = $ul->get($numUsersToGet, $offset);


See more documentation about the user list model here:http://www.concrete5.org/documentation/developers/permissions/user-...

And you can get groups like this:
Loader::model('search/group');
$gs = new GroupSearch();
$groups = $gs->get($numGroupsToGet, $offset);


And you can see more info about groups here:http://www.concrete5.org/documentation/developers/permissions/group...

Or if you don't want to write any code you can do like SheldonB said and check out JohntheFish's magic data addon. I don't know much about magic data though so I'm not positive how you would accomplish this using it.

Hope that helps!