Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/13/2016 03:39:54 AM (8 years ago)
Author:
boonebgorges
Message:

Improve slash handling for Full Name field name.

The Full Name field name is stored as slashed data, so we must query it
as slashed data too. Otherwise, the query misses in certain cases,
resulting in wacky behavior when syncing WP and BP profile fields.

Fixes #7317.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-functions.php

    r11035 r11243  
    10641064
    10651065        $bp = buddypress();
    1066         $id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", bp_xprofile_fullname_field_name() ) );
     1066        $id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", addslashes( bp_xprofile_fullname_field_name() ) ) );
    10671067
    10681068        wp_cache_set( 'fullname_field_id', $id, 'bp_xprofile' );
Note: See TracChangeset for help on using the changeset viewer.