CoreFiles by mySites.guru
user.php47 lines, 761 bytes, from Joomla_3.7.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 3.6.0-alpha
md5
77737cac83d8ec5975db029b151e2f02
sha1
418a95e76c76a3ea9a778faa7b3b90a3f5bd9e93
sha256
05fefd3f516f28175bb11a732bfb67cd1a5f3123e07a1c0c07866f60d3d44eef
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_fields
 * 
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

if (!key_exists('field', $displayData))
{
	return;
}

$field = $displayData['field'];
$value = $field->value;

if ($value == '')
{
	return;
}

$value = (array) $value;
$texts = array();

foreach ($value as $userId)
{
	if (!$userId)
	{
		continue;
	}

	$user = JFactory::getUser($userId);

	if ($user)
	{
		// Use the Username
		$texts[] = $user->name;
		continue;
	}

	// Fallback and add the User ID if we get no JUser Object
	$texts[] = $userId;
}

echo htmlentities(implode(', ', $texts));

No other release has this exact content. See every version of this file.