CoreFiles by mySites.guru
Dispatcher.php52 lines, 1,136 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
1c11c840b8b6a119ec21797842426979
sha1
416b57e85794d36043854aedc96999f912a65857
sha256
f9bafa615d59148b1093b102c01c7e533e8ca43de96b85b0034ec8f0dc6eac44
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_login
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Login\Administrator\Dispatcher;

use Joomla\CMS\Dispatcher\ComponentDispatcher;

/**
 * ComponentDispatcher class for com_login
 *
 * @since  4.0.0
 */
class Dispatcher extends ComponentDispatcher
{
    /**
     * Dispatch a controller task.
     *
     * @return  void
     *
     * @since   4.0.0
     */
    public function dispatch()
    {
        // Only accept two values login and logout for `task`
        $task = $this->input->get('task');

        if ($task != 'login' && $task != 'logout') {
            $this->input->set('task', '');
        }

        // Reset controller name
        $this->input->set('controller', null);

        parent::dispatch();
    }

    /**
     * com_login does not require check permission, so we override checkAccess method and have it empty
     *
     * @return  void
     */
    protected function checkAccess()
    {
    }
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.