Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Classes/Controller/FrontendLoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ class FrontendLoginController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCo
* @var string
*/
protected $remoteUser;

/**
* The LoginController is only used to be able to dispatch the LoginConfirmed event.
* @var LoginController
*/
private LoginController $loginController;

public function __construct(LoginController $loginController)
{
$this->loginController = $loginController;
}

public function initializeAction()
{
Expand Down Expand Up @@ -113,6 +124,8 @@ public function showLoginAction()
*/
public function loginSuccessAction()
{
$this->eventDispatcher->dispatch(new LoginConfirmedEvent($this->loginController, $this->view));

$redirectUrl = GeneralUtility::_GP('redirect_url');
$targetUrl = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . $redirectUrl;
$targetUrl = GeneralUtility::sanitizeLocalUrl($targetUrl);
Expand Down