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;
	}
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;
	}
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 ; }
for compatibility, will map to the user metadata

@return  Array
for compatibility will map to the user metadata