Your cart is currently empty!
function Get_Groups
—
by
Hi,
I couldn’t find the correct groups topic, so I’ll post it here.
Is there a function like get_pages($args) ?
I need :
– an array of all the groups created on the site
– an array of all the users related to a group
I’m looking through your API pages : http://api.itthinx.com/groups/ but I can’t seem to find the correct function.
Posted in Groups Restrict Categories
Comments
3 responses to “function Get_Groups”
Looking for something similar. Is there a way to grab an array of ALL Groups -> ID, Name & Description for the logged in user?
groups_user_group gets me close… but I don’t get the ID or Description in the return.
Hi Linus,
That would be:
$u = new Groups_User( $user_id );
$groups = $u->groups();
… which returns an array of
Groups_Group
objects.See http://www.itthinx.com/documentation/groups/shortcodes/ and http://www.itthinx.com/documentation/groups/api/examples/ please.