CoreFiles by mySites.guru
user.php44 lines, 1,049 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
2715c9a9c943c13c2351b63c7ce04222
sha1
24435fb88475c3611ced65ef9ff7f709d1f20cc3
sha256
60e966a935ea48bbbf05eab54590d4ffda9356e5221024f34a605747de20086c
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.User
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;

/**
 * Fields User Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsUser extends \Joomla\Component\Fields\Administrator\Plugin\FieldsPlugin
{

	/**
	 * Transforms the field into a DOM XML element and appends it as a child on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, Form $form)
	{
		if (Factory::getApplication()->isClient('site'))
		{
			// The user field is not working on the front end
			return;
		}

		return parent::onCustomFieldsPrepareDom($field, $parent, $form);
	}
}

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