Title: [Plugin: Edit Flow] retrieve usergroup
Last modified: August 20, 2016

---

# [Plugin: Edit Flow] retrieve usergroup

 *  Resolved [phracktale](https://wordpress.org/support/users/phracktale/)
 * (@phracktale)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-edit-flow-retrieve-usergroup/)
 * Hi,
 * I try to retrieve edit_flow specific group from an user in functions.php of my
   theme.
 *     ```
       global $current_user, $edit_flow;
       $usergroup = $edit_flow->user_groups->get_usergroups_for_user($current_user->ID);
       ```
   
 * Doesn’t work.
 * in get_usergroups_for_user function from module/user-groups.php
    This var : $
   all_usergroups is empty.
 * What is wrong please ?
 * [http://wordpress.org/extend/plugins/edit-flow/](http://wordpress.org/extend/plugins/edit-flow/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-edit-flow-retrieve-usergroup/#post-2600611)
 * Could you describe more how you’re using this code? It might be [related to this thread](http://wordpress.org/support/topic/plugin-edit-flow-exporting-editorial-metadata?replies=10).
 * Also $usergroup != $all_usergroups, so please double-check your code.
 *  [mogmismo](https://wordpress.org/support/users/mogmismo/)
 * (@mogmismo)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-edit-flow-retrieve-usergroup/#post-2600687)
 * I’ll second that, $all_usergroups is empty when called directly, as phracktale
   is calling it.
 * I’m trying this to list the groups on a frontend contributor template, such as:
 * **John Doe is a photographer, editor and writer for our site.**
 * I’d like a way, from frontend templates, to get, as an array, the groups that
   a user is in. Kind of like the iterater in coauthors plus, if possible. I’ve 
   verified that I’m sending the user’s ID (as a number) to get_usersgroups_for_user(),
   but $all_usergroups (in line 1040ish) is var_dumping as:
 * array(2) { [0]=> bool(false) [1]=> bool(false) }
 * thanks,
 * M.
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-edit-flow-retrieve-usergroup/#post-2600688)
 * I’ve flagged this as an [issue to fix](https://github.com/danielbachhuber/Edit-Flow/issues/83)
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-edit-flow-retrieve-usergroup/#post-2600723)
 * This should be doable now in v0.7.4

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Edit Flow] retrieve usergroup’ is closed to new replies.

 * ![](https://ps.w.org/edit-flow/assets/icon-256x256.png?rev=3433533)
 * [Edit Flow](https://wordpress.org/plugins/edit-flow/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/edit-flow/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/edit-flow/)
 * [Active Topics](https://wordpress.org/support/plugin/edit-flow/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/edit-flow/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/edit-flow/reviews/)

## Tags

 * [bug reports](https://wordpress.org/support/topic-tag/bug-reports/)

 * 4 replies
 * 3 participants
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-edit-flow-retrieve-usergroup/#post-2600723)
 * Status: resolved