CoreFiles by mySites.guru
Dispatcher.php54 lines, 1,060 bytes, from Joomla_4.1.3-Stable-Full_Package.zip
Raw History Compare with 4.1.2
md5
4b673e6a4d2aa37a464c27ffc4f6def8
sha1
4ea9eec934117f84ee378a1d9bd8b7b79c8b7753
sha256
20e5c01bdfb924980cf312af6a9770bf6391e33d420d350e8e92019c9e73478c
<?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;

\defined('_JEXEC') or die;

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 51 releases, Joomla 4.0.0-beta6 to 4.2.0-beta2. See them all, or every version of this file.