CoreFiles by mySites.guru
user.php45 lines, 1,201 bytes, from Joomla_3.7.0-beta4-Beta-Full_Package.zip
Raw History Compare with 3.7.0-beta3
md5
fb5fcdd739e610c2ed0ecd0610c4c9c1
sha1
a227472c6c6f528bc646426982d11d96fea225c1
sha256
67c035127662be3990916db14eb1c19de17d2194f02d4317b132c7b509e8e7b2
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.User
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR);

/**
 * Fields User Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsUser extends FieldsPlugin
{

	/**
	 * Transforms the field into an XML element and appends it as child on the given parent. This
	 * is the default implementation of a field. Form fields which do support to be transformed into
	 * an XML Element must implement the JFormDomfieldinterface.
	 *
	 * @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, JForm $form)
	{
		if (JFactory::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.