我正在使用auth类型的服务来添加基于API的登录.我尝试通过Extbase添加一个带有FrontendUserRepository的用户@inject.但这不起作用.
我做错了什么,或者是否要尽早使用依赖注入?
PS:我知道我可以通过以下方式使用存储库:
$objectManager = GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\ObjectManager');
$this->frontendUserRepository = $objectManager->get('TYPO3\\CMS\\Extbase\\Domain\\Repository\\FrontendUserRepository');
Run Code Online (Sandbox Code Playgroud)