Opened 15 years ago
Closed 15 years ago
#1801 closed defect (bug) (fixed)
Cannot leave group
Reported by: | cnorris23 | Owned by: | |
---|---|---|---|
Milestone: | 1.2 | Priority: | blocker |
Severity: | Version: | ||
Component: | Keywords: | has-patch dev-feedback | |
Cc: |
Description
Leaving a group failed to work. BP_Groups_Member::delete() always returned true, so I cast $delete_result as an integer. I also added some feedback to let users know they either can't leave the group as the only admin, or that they've successfully left the group.
I did have one question. In the groups leave function there is this line
if ( !groups_uninvite_user( $user_id, $group_id, true ) )
The groups_uninvite_user() function doesn't accept the 'true' parameter. However, BP_Groups_Member::delete(), accepts $check_empty parameter, which defaults to true. The string $check_empty isn't used anywhere in the BP_Groups_Member::delete() function. Are the extra parameters something we should lose?
Yes the params are deprecated and should be removed.