-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Scenario "Login as":
In the backend module when I click the "Login as" button in the desired user line it opens a new tab with the url: http://www.example.com/?eID=femanagerLoginAs&user=18
It then makes a 303 redirect in the new tab to http://www.example.com/ but does not log me in as the desired user.
Scenario "Autologin":
If I enable autologin via typoscript (plugin.tx_femanager.settings.new.login = 1) it also is not working.
Hacky solution
A really dirty hack which fixed the problem for me was to add the following lines to classes/Utility/UserUtility.php
$reflection = new \ReflectionClass($tsfe->fe_user);
$setSessionCookieMethod = $reflection->getMethod('setSessionCookie');
$setSessionCookieMethod->setAccessible(TRUE);
$setSessionCookieMethod->invoke($tsfe->fe_user);
after
$tsfe->fe_user->createUserSession($user);
Like it is described here:
https://forge.typo3.org/issues/62194#note-6
The strange thing is, that on my local MAMP environment it works without those 4 lines and on the production environment it did not.
Any idea how to resolve the error?
Kind regards,
David
System environment (Production)
TYPO3: 8.7.4
femanager: 3.1.1
PHP: 7.0.22-0ubuntu0.16.04.1
System environment (Development)
TYPO3: 8.7.4
femanager: 3.1.1
PHP: 7.0.20