Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • So far this is as close as I have gotten:

    
    public static function get_extended_fields( $user_id ) {
    		
    		$fields = array();
    		
    		/* Get User Extended Data */
    		$r = bp_parse_args( $args['args'], array(
    			'profile_group_id' => 0,
    			'user_id'          =>  $user_id
    		), 'bp_xprofile_user_admin_profile_loop_args' );
    
    		$i = 0;
    		
    		if ( bp_has_profile( $r ) ) {
    			
    			while ( bp_profile_groups() ) {
    				
    				bp_the_profile_group(); 
    				
    				while ( bp_profile_fields() ) {
    					
    					bp_the_profile_field();
    					$field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    
    					$fields[ $i ]['name'] = bp_get_the_profile_field_name();
    					$fields[ $i ]['id'] = bp_get_the_profile_field_input_name();
    					$fields[ $i ]['value'] = bp_get_the_profile_field_edit_value();
    	
    					$i++;
    				}
    			}		
    		}
    		return $fields;
    		
    	}
    

    Hopefully an answer can come here (for documentation sake):
    https://buddypress.org/support/topic/how-to-get-all-extended-fields-values-given-user-id/

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar