<?php
header ("content-type: text/xml");
echo '<users>';
	if(isset($users))
	{
		foreach($users as $key=>$value)
		{
			echo '<user>';
				echo '<account_id>'.$value->account_id.'</account_id>';
				if($user_type == 'afiliant')
					echo '<name>'.$value->imie.' '.$value->nazwisko.'</name>';
				else
					echo '<name>'.$value->name.'</name>';	
			echo '</user>';		
		}
	}
echo '</users>';
?>