Changeset 10278 for trunk/src/bp-groups/bp-groups-functions.php
- Timestamp:
- 10/14/2015 06:24:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r10148 r10278 440 440 } 441 441 442 if ( ! groups_remove_member( $user_id, $group_id ) ) {442 if ( ! BP_Groups_Member::delete( $user_id, $group_id ) ) { 443 443 return false; 444 444 } … … 1435 1435 1436 1436 if ( ! bp_is_item_admin() ) { 1437 // bp_is_item_admin may not be set if this function is called outside of group context. 1438 // Site admins and group admins can remove a member from a group. 1439 // A member may also request to remove herself from a group. 1440 if ( ! current_user_can( 'bp_moderate' ) 1441 && ! groups_is_user_admin( bp_loggedin_user_id(), $group_id ) 1442 && $user_id != bp_loggedin_user_id() ) { 1443 return false; 1444 } 1445 } 1437 return false; 1438 } 1446 1439 1447 1440 $member = new BP_Groups_Member( $user_id, $group_id );
Note: See TracChangeset
for help on using the changeset viewer.