- md5
- cfd2c325927eaa9c48551b66ef6af88e
- sha1
- 957bf0f00071e08cdb1b0dd98045c87e46a249b3
- sha256
- d07d5ed2431206350f4f495448af9de42c504c8c7bcffca4c3564bfb45cafab8
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
<?php
/**
* @package Joomla.Administrator
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Users\Site\Controller;
use Joomla\CMS\Router\Route;
use Joomla\Component\Users\Administrator\Controller\CaptiveController as AdminCaptiveController;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Captive Multi-factor Authentication page controller
*
* @since 4.2.0
*/
class CaptiveController extends AdminCaptiveController
{
/**
* Execute a task by triggering a Method in the derived class.
*
* @param string $task The task to perform.
*
* @return mixed The value returned by the called Method.
*
* @throws \Exception
* @since 4.2.0
*/
public function execute($task)
{
try {
return parent::execute($task);
} catch (\Exception $e) {
if ($e->getCode() !== 403) {
throw $e;
}
if ($this->app->getIdentity()->guest) {
$this->setRedirect(Route::_('index.php?option=com_users&view=login', false));
return null;
}
}
return null;
}
}
The same content is in 127 releases, Joomla 4.2.1 to 5.3.0-alpha3. See them all, or every version of this file.