original_string: public function get_profile_fields($field = null, $default = null)
  	{
  		// collect all meta data
  		$profile_fields = array();
  
  		foreach ($this->user->metadata as $metadata)
  		{
  			if (empty($field))
  			{
  				$profile_fields[$metadata->key] = $metadata->value;
  			}
  			elseif ($field == $metadata->key)
  			{
  				return $metadata->value;
  			}
  		}
  
  		// return the connected data
  		return empty($profile_fields) ? $default : $profile_fields;
  	}
code: public function get_profile_fields($field = null, $default = null)
  	{
  		// collect all meta data
  		$profile_fields = array();
  
  		foreach ($this->user->metadata as $metadata)
  		{
  			if (empty($field))
  			{
  				$profile_fields[$metadata->key] = $metadata->value;
  			}
  			elseif ($field == $metadata->key)
  			{
  				return $metadata->value;
  			}
  		}
  
  		// return the connected data
  		return empty($profile_fields) ? $default : $profile_fields;
  	}
code_tokens: public function get_profile_fields ( $ field = null , $ default = null ) { // collect all meta data $ profile_fields = array ( ) ; foreach ( $ this -> user -> metadata as $ metadata ) { if ( empty ( $ field ) ) { $ profile_fields [ $ metadata -> key ] = $ metadata -> value ; } elseif ( $ field == $ metadata -> key ) { return $ metadata -> value ; } } // return the connected data return empty ( $ profile_fields ) ? $ default : $ profile_fields ; }
docstring: for compatibility, will map to the user metadata
  
  @return  Array
docstring_tokens: for compatibility will map to the user metadata