Title: Get All Users with Capability
Last modified: August 24, 2016

---

# Get All Users with Capability

 *  Resolved [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/get-all-users-with-capability/)
 * Hi,
 * I’ve trying to hook into save_post to send an email to users with the capability
   that has been assigned to the post.
 * Unfortunately for me it looks like capabilities are not stored in usermeta or
   as a proper capability.
 * Does Groups provide any sort of functionality for getting all users (objects,
   ids, whatever) with a Capability, or in a Group?
 * My last resort is just doing a manual query, but I’d like to avoid it if possible,
   since it’s not my strong suit.
 * Thanks
 * [https://wordpress.org/plugins/groups/](https://wordpress.org/plugins/groups/)

Viewing 1 replies (of 1 total)

 *  [gtsiokos](https://wordpress.org/support/users/gtsiokos/)
 * (@gtsiokos)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/get-all-users-with-capability/#post-6042788)
 * Hi JakePT,
 * Try using `$group = new Groups_Groups( $group_id );
    $users = $group->users;`
 * You can also find other useful examples in [http://docs.itthinx.com/document/groups/api/examples/](http://docs.itthinx.com/document/groups/api/examples/)
 * Cheers

Viewing 1 replies (of 1 total)

The topic ‘Get All Users with Capability’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups - Memberships and Access Control](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [gtsiokos](https://wordpress.org/support/users/gtsiokos/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/get-all-users-with-capability/#post-6042788)
 * Status: resolved