CoreFiles by mySites.guru
user.php42 lines, 996 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
e7f16a9997b60ad96cb2c79ada7d34f6
sha1
63dbbd32969830ec46d8c5680e82c26b2679ae80
sha256
c423a423305aafed0d00e61796809021bd72e0d543071f4c803afb6f0a8f91a5
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.User
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

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   Form        $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, Form $form)
	{
		if ($this->app->isClient('site'))
		{
			// The user field is not working on the front end
			return;
		}

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

The same content is in 49 releases, Joomla 4.0.0-rc1 to 4.2.0-beta2. See them all, or every version of this file.