Commit 7cf3dac9 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[TASK] Remove unnecessary access of superglobals

Since $loginType will be always 'BE' in this context, there is
no need to access $GLOBALS['BE_USER'] for this information.

Resolves: #93018
Releases: master
Change-Id: I0c6bef5d7f8eebbe2aca325d7e3737a2659dd53a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67046


Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 282de42e
......@@ -16,7 +16,6 @@
namespace TYPO3\CMS\Beuser\Domain\Repository;
use TYPO3\CMS\Beuser\Domain\Model\Demand;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Session\Backend\SessionBackendInterface;
use TYPO3\CMS\Core\Session\SessionManager;
......@@ -152,17 +151,8 @@ class BackendUserRepository extends BackendUserGroupRepository
/**
* @return SessionBackendInterface
*/
protected function getSessionBackend()
protected function getSessionBackend(): SessionBackendInterface
{
$loginType = $this->getBackendUserAuthentication()->getLoginType();
return GeneralUtility::makeInstance(SessionManager::class)->getSessionBackend($loginType);
}
/**
* @return BackendUserAuthentication
*/
protected function getBackendUserAuthentication()
{
return $GLOBALS['BE_USER'];
return GeneralUtility::makeInstance(SessionManager::class)->getSessionBackend('BE');
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment