[buddypress-trac] [BuddyPress] #2698: bp_has_groups can't read slug
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sat Feb 4 20:54:25 UTC 2012
#2698: bp_has_groups can't read slug
--------------------------+-----------------------
Reporter: kayue | Owner:
Type: defect (bug) | Status: reopened
Priority: major | Milestone: 1.5
Component: Groups | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------
Changes (by yoshu):
* cc: yoshu (added)
* status: closed => reopened
* resolution: invalid =>
* severity: => normal
Comment:
This looks like a bug to me. The following if statement should return
false since there is no slug such as "gibberish". The other parameters
like "max" and "user_id" work as expected.
{{{
<?php
global $current_user;
get_currentuserinfo();
$arrrr = array(
'slug' => 'gibberish',
'max' => '1',
'user_id' => $current_user->ID
);
if ( bp_has_groups ( $arrrr ) ) {
echo 'Your ID is ' . ($current_user->ID );
echo '<br> Yarrr matey! <br>';
echo bp_groups_pagination_count() . "<br>";
} else {
echo 'you're not a member of this group <br>';
}
?>
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/2698#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list