Skip to:
Content

BuddyPress.org

Ticket #6082: 6082.patch

File 6082.patch, 712 bytes (added by dontdream, 10 years ago)
  • src/bp-xprofile/bp-xprofile-classes.php

     
    854854                if ( empty( $bp->profile->table_name_fields ) || !isset( $field_name ) )
    855855                        return false;
    856856
    857                 return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $field_name ) );
     857                return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s AND parent_id = 0", $field_name ) );
    858858        }
    859859
    860860        public static function update_position( $field_id, $position, $field_group_id ) {