Changeset 9901 for trunk/src/bp-groups/classes/class-bp-groups-member.php
- Timestamp:
- 05/31/2015 05:37:08 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-member.php
r9819 r9901 722 722 * Delete an invitation, by specifying user ID and group ID. 723 723 * 724 * @param int $user_id ID of the user. 725 * @param int $group_id ID of the group. 724 * @global WPDB $wpdb 725 * 726 * @param int $user_id ID of the user. 727 * @param int $group_id ID of the group. 726 728 * @return int Number of records deleted. 727 729 */ … … 729 731 global $wpdb; 730 732 731 if ( empty( $user_id ) ) 732 return false; 733 734 $bp = buddypress(); 735 736 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND inviter_id != 0 AND invite_sent = 1", $user_id, $group_id ) ); 733 if ( empty( $user_id ) ) { 734 return false; 735 } 736 737 $table_name = buddypress()->groups->table_name_members; 738 739 $sql = "DELETE FROM {$table_name} 740 WHERE user_id = %d 741 AND group_id = %d 742 AND is_confirmed = 0 743 AND inviter_id != 0"; 744 745 $prepared = $wpdb->prepare( $sql, $user_id, $group_id ); 746 747 return $wpdb->query( $prepared ); 737 748 } 738 749
Note: See TracChangeset
for help on using the changeset viewer.