Project

General

Profile

Actions

Bug #49046

closed

impossible to use repositories or requests to action controller in auth_service

Added by Julian Walter over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
felogin
Target version:
-
Start date:
2013-06-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.4
Tags:
Complexity:
nightmare
Is Regression:
No
Sprint Focus:

Description

I've implemented my own auth_service which authenticates my users against an ADLDS (ldap from microsoft).
The service works, but it is really not possible to use repositories or create requests to action controllers.
I tried to inject them via "at inject" which leads to a 'Fatal error: Call to a member function xxxfunction() on a non-object error.' of my repositories.
I tried it with \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('PATH\\TO\\MY\\REPOSITORY'); - same shit again
I tried it with
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
$objectManager->get('PATH\\TO\\MY\\REPOSITORY');

which leads to 'Fatal error: Call to a member function versionOL() on a non-object in typo3\sysext\extbase\Classes\Persistence\Generic\Storage\Typo3DbBackend.php on line 1203'

Obviously the problem is that there is no TSFE object... pls fix it or give me some advice how to solve it.
I need the repositories to update and import users while logging in, otherwise I have to use oldschool database operations.

Btw I also tried to use:

$request = $objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Request');
$dispatcher = $objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher');
$response = $objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Response');
$request->setArguments(SomeArguments);
$request->setControllerExtensionName('MyExtensionName');
$request->setControllerVendorName('MYVENDORNAME');
$request->setControllerName('MyControllerName');
$request->setControllerActionName('myactionname');
$dispatcher->dispatch($request,$response);

it is just IMPOSSIBLE!

Actions

Also available in: Atom PDF