Skip to content

Commit

Permalink
Fix for fields output being loaded in edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
AndySDH committed Mar 26, 2020
1 parent 321702a commit 51c7681
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions components/com_users/views/profile/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,22 @@ public function display($tpl = null)
return false;
}

JPluginHelper::importPlugin('content');
$this->data->text = '';
JEventDispatcher::getInstance()->trigger('onContentPrepare', array ('com_users.user', &$this->data, &$this->data->params, 0));
unset($this->data->text);

// Check for layout override
$active = JFactory::getApplication()->getMenu()->getActive();

if (isset($active->query['layout']))
{
$this->setLayout($active->query['layout']);
}

// Check layout type
if ($this->getLayout() == 'default')
{
JPluginHelper::importPlugin('content');
$this->data->text = '';
JEventDispatcher::getInstance()->trigger('onContentPrepare', ['com_users.user', &$this->data, &$this->data->params, 0]);
unset($this->data->text);
}

// Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
Expand Down

0 comments on commit 51c7681

Please sign in to comment.