[buddypress-trac] [BuddyPress Trac] #5766: groups_get_groups does not populate_extras
buddypress-trac
noreply at wordpress.org
Sat Jul 19 20:38:55 UTC 2014
#5766: groups_get_groups does not populate_extras
--------------------------+-----------------------------
Reporter: shanebp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 2.0
Severity: normal | Keywords:
--------------------------+-----------------------------
Version 2.0.1
This function should return data that includes fields re group admins &
group mods...
{{{
function test_group_data() {
$user_id = get_current_user_id();
$args = array(
'user_id' => $user_id,
'populate_extras' => true,
);
$groups = groups_get_groups( $args );
var_dump( $groups );
}
}}}
This is the output of one of the returned groups:
{{{
[0]=> object(stdClass)#1426 (15) {
["id"]=> string(3) "273"
["creator_id"]=> string(1) "1"
["name"]=> string(35) "Test Group"
["slug"]=> string(35) "test-group"
["description"]=> string(72) "a test group"
["status"]=> string(6) "public"
["enable_forum"]=> string(1) "0"
["date_created"]=> string(19) "2014-03-20 20:37:47"
["parent_id"]=> string(1) "0"
["total_member_count"]=> string(2) "18"
["last_activity"]=> string(19) "2014-07-18 16:44:04"
["is_member"]=> string(1) "1"
["is_invited"]=> string(1) "0"
["is_pending"]=> string(1) "0"
["is_banned"]=> bool(false) }
}}}
As you can see, there are no fields re group admins or mods.
It seems that 'populate_extras' is being ignored... ?
I also tried...
{{{
groups_get_user_groups( $user_id );
}}}
... the output of which includes fields for admins & mods but the fields
are always NULL
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5766>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list