Skip to:
Content

BuddyPress.org

Ticket #6524: 6524.bp_groups_member.patch

File 6524.bp_groups_member.patch, 946 bytes (added by r-a-y, 9 years ago)
  • src/bp-groups/classes/class-bp-groups-member.php

     
    230230                 */
    231231                do_action_ref_array( 'groups_member_before_save', array( &$this ) );
    232232
     233                // The following properties are required; bail if not met.
     234                if ( empty( $this->user_id ) || empty( $this->group_id ) ) {
     235                        return false;
     236                }
     237
    233238                if ( !empty( $this->id ) ) {
    234239                        $sql = $wpdb->prepare( "UPDATE {$bp->groups->table_name_members} SET inviter_id = %d, is_admin = %d, is_mod = %d, is_banned = %d, user_title = %s, date_modified = %s, is_confirmed = %d, comments = %s, invite_sent = %d WHERE id = %d", $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent, $this->id );
    235240                } else {