Support » Plugin: Edit Flow » [Plugin: Edit Flow] retrieve usergroup

  • Resolved phracktale



    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 ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Bachhuber


    Could you describe more how you’re using this code? It might be related to this thread.

    Also $usergroup != $all_usergroups, so please double-check your code.

    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) }



    Plugin Author Daniel Bachhuber


    I’ve flagged this as an issue to fix

    Plugin Author Daniel Bachhuber


    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.