| Current Path : /var/www/html/components/com_kunena/src/Controller/User/Edit/User/ |
| Current File : /var/www/html/components/com_kunena/src/Controller/User/Edit/User/UserEditUserDisplay.php |
<?php
/**
* Kunena Component
*
* @package Kunena.Site
* @subpackage Controller.User
*
* @copyright Copyright (C) 2008 - 2026 Kunena Team. All rights reserved.
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/
namespace Kunena\Forum\Site\Controller\User\Edit\User;
\defined('_JEXEC') or die();
use Exception;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Kunena\Forum\Site\Controller\User\Edit\UserEditDisplay;
/**
* Class ComponentUserControllerEditUserDisplay
*
* @since Kunena 4.0
*/
class UserEditUserDisplay extends UserEditDisplay
{
/**
* @var boolean
* @since Kunena 6.0
*/
public $changeUsername;
/**
* @var string
* @since Kunena 6.0
*/
public $frontendForm;
/**
* @var string
* @since Kunena 6.0
*/
protected $name = 'User/Edit/User';
/**
* Load user form.
*
* @return void
* @throws null
* @since Kunena 6.0
*/
protected function before()
{
parent::before();
$userParams = ComponentHelper::getParams('com_users');
// Check if user is allowed to change his name.
$this->changeUsername = $userParams->get('change_login_name', 1);
$this->headerText = Text::_('COM_KUNENA_PROFILE_EDIT_USER_TITLE');
}
/**
* Prepare document.
*
* @return void
*
* @throws Exception
* @since Kunena 6.0
*/
protected function prepareDocument()
{
$menu_item = $this->app->getMenu()->getActive();
if ($menu_item) {
$params = $menu_item->getParams();
$params_title = $params->get('page_title');
$params_description = $params->get('menu-meta_description');
if (!empty($params_title)) {
$title = $params->get('page_title');
$this->setTitle($title);
} else {
$this->setTitle($this->headerText);
}
if (!empty($params_description)) {
$description = $params->get('menu-meta_description');
$this->setDescription($description);
} else {
$this->setDescription($this->headerText);
}
}
}
}