• Hello,

    Could you please assist me with this issue? When I use the following shortcode:
    [xprofile field=179 user=”DJohnson”]

    I get this error:
    Catchable fatal error: Object of class WP_User could not be converted to string in /…/wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-profiledata.php on line 369

    This is the code for that section for line 369

    // Assemble uncached IDs
    		$uncached_ids = array();
    		foreach ( $user_ids as $user_id ) {
    			$cache_key = "{$user_id}:{$field_id}";
    			if ( false === wp_cache_get( $cache_key, 'bp_xprofile_data' ) ) {
    				$uncached_ids[] = $user_id;
    			}
    		}

    Thanks in advance!

    https://ww.wp.xz.cn/plugins/bp-xprofile-shortcode/

The topic ‘Error when using user="username"’ is closed to new replies.