function Get_Groups

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.

3 Responses to function Get_Groups

  1. Linus May 15, 2014 at 9:54 pm #

    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.

    • kento May 16, 2014 at 10:15 am #

      Hi Linus,

      That would be:

      $u = new Groups_User( $user_id );
      $groups = $u->groups();

      … which returns an array of Groups_Group objects.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share