芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/plugins.1/fields/user/tmpl/user.php
* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; $value = $field->value; if ($value == '') { return; } $value = (array) $value; $texts = array(); foreach ($value as $userId) { if (!$userId) { continue; } $user = Factory::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));