Get meta from Groups (itthinx) plugin
-
Hi – I love your plugin, but I now need to include the name of the Group a user belongs to. The Groups developer says it uses its own database, so there’s no WP user meta key. However they do provide some functions for finding the group. Possible to use these to add a column to my export?
Get all groups the current user belongs to
$groups_user = new Groups_User( get_current_user_id() );
// get group objects
$user_groups = $groups_user->groups;
// get group ids (user is direct member)
$user_group_ids = $groups_user->group_ids;
// get group ids (user is direct member or by group inheritance)
$user_group_ids_deep = $groups_user->group_ids_deep;
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get meta from Groups (itthinx) plugin’ is closed to new replies.