Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/zenit/administrator/components/com_users/src/Dispatcher/ |
Upload File : |
<?php
/**
* @package Joomla.Administrator
* @subpackage com_users
*
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Users\Administrator\Dispatcher;
\defined('_JEXEC') or die;
use Joomla\CMS\Dispatcher\ComponentDispatcher;
/**
* ComponentDispatcher class for com_users
*
* @since 4.0.0
*/
class Dispatcher extends ComponentDispatcher
{
/**
* Override checkAccess to allow users edit profile without having to have core.manager permission
*
* @return void
*
* @since 4.0.0
*/
protected function checkAccess()
{
$task = $this->input->getCmd('task');
$view = $this->input->getCmd('view');
$layout = $this->input->getCmd('layout');
$allowedTasks = ['user.edit', 'user.apply', 'user.save', 'user.cancel'];
// Allow users to edit their own account
if (in_array($task, $allowedTasks, true) || ($view === 'user' && $layout === 'edit'))
{
$user = $this->app->getIdentity();
$id = $this->input->getInt('id');
if ((int) $user->id === $id)
{
return;
}
}
parent::checkAccess();
}
}