Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/19/2010 10:40:49 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Setup xprofile globals if get_user_extras is called before xprofile_setup_globals runs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core/bp-core-classes.php

    r2695 r2860  
    321321        /* Fetch the user's full name */
    322322        if ( function_exists( 'xprofile_install' ) && 'alphabetical' != $type ) {
     323            /* Ensure xprofile globals are set */
     324            if ( !defined( 'BP_XPROFILE_FULLNAME_FIELD_NAME' ) )
     325                xprofile_setup_globals();
     326
    323327            $names = $wpdb->get_results( $wpdb->prepare( "SELECT pd.user_id as id, pd.value as fullname FROM {$bp->profile->table_name_fields} pf, {$bp->profile->table_name_data} pd WHERE pf.id = pd.field_id AND pf.name = %s AND pd.user_id IN ( {$user_ids} )", BP_XPROFILE_FULLNAME_FIELD_NAME ) );
    324328            for ( $i = 0; $i < count( $paged_users ); $i++ ) {
Note: See TracChangeset for help on using the changeset viewer.