Skip to content

Commit

Permalink
fix: remove needless logic (which is not required anymore in TYPO3v12…
Browse files Browse the repository at this point in the history
…) which breaks the FE-login-process in TYPO3v12
  • Loading branch information
Jürgen Kußmann committed Sep 11, 2024
1 parent 5c6f261 commit 3c568f1
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions Classes/Service/AuthUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,9 @@
use Aoe\FeloginBruteforceProtection\Domain\Service\RestrictionService;
use Aoe\FeloginBruteforceProtection\System\Configuration;
use Psr\Http\Message\ServerRequestInterface;
use stdClass;
use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
use TYPO3\CMS\Core\Authentication\AuthenticationService;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
use TYPO3\CMS\Core\TypoScript\TemplateService;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;

class AuthUser extends AuthenticationService
Expand All @@ -48,13 +43,6 @@ class AuthUser extends AuthenticationService
*/
protected $configuration;

/**
* Object manager
*
* @var ObjectManagerInterface
*/
protected $objectManager;

/**
* @var RestrictionService
*/
Expand All @@ -65,37 +53,6 @@ class AuthUser extends AuthenticationService
*/
protected $frontendUserAuthentication;

/**
* Load extbase dependencies to use repositories and persistence.
* returns TRUE if the service is available
*/
public function init(): bool
{
$request = $this->getRequest();
if ($request::class === ServerRequestInterface::class) {
$loginTypePost = $this->getRequest()
->getParsedBody()['logintype'];
if ($loginTypePost != 'login') {
return parent::init();
}
}

ExtensionManagementUtility::loadBaseTca(false);
if (!isset($GLOBALS['TSFE'])) {
$GLOBALS['TSFE'] = new stdClass();
}

if (empty($GLOBALS['TSFE']->sys_page)) {
$GLOBALS['TSFE']->sys_page = GeneralUtility::makeInstance(PageRepository::class);
}

if (empty($GLOBALS['TSFE']->tmpl)) {
$GLOBALS['TSFE']->tmpl = GeneralUtility::makeInstance(TemplateService::class);
}

return parent::init();
}

/**
* Initialize authentication service
*
Expand Down

0 comments on commit 3c568f1

Please sign in to comment.