<?php

	defined('FULL_PATH') or die('restricted access!');

	/**
	 * Extends default UsersTagProcessor class
	 *
	 */
	class EUserTagProcessor extends UsersTagProcessor  {

		/**
		 * Returns formated user address
		 *
		 * @param Array
		 * @return string
		 */
		function PrintFormattedUserAddress($params)
		{
			$object =& $this->getObject($params);
			/* @var $object kDBItem */

			$ret = '';
			$newline = '<br/>';

			if ($object->isLoaded()) {
				$ret = $object->GetField('Street') ? $object->GetField('Street') . $newline : '';
				$ret .= $object->GetField('Street2') ? $object->GetField('Street2') . $newline : '';
				$ret .= $object->GetField('City') ? $object->GetField('City') . ', ' : '';
				$ret .= $object->GetField('State') ? $object->GetField('State') . ' ' : '';
				$ret .= $object->GetField('Zip') ? $object->GetField('Zip') . $newline : '';
				$ret .= $object->GetField('Country');
			}

			return $ret;
		}

	}