-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to "Login as" in backend and to "autologin" after registration #27
Comments
Hmm, first of all I think that you could be right but I can't reproduce it on my testparcours. |
I had the exact same problem. In some cases the session cookie will be reset to a anonymous fe-user cookie, but I could not find the reason why this happened. But this hack did the trick, thanks! |
Some users reported that autologin does not work. I'm not final sure what the error is about, but this hacky function seems to work. See details on Github issue. Related: #27
Ok, normally I do not fix stuff that I can't reproduce. And that the solution is a reflexion class does not make this situation easier. |
count me in on this fix. enabling it in install-tool is the only way to make it work for me too. thanks for that anyway! PHP 7.1.4 (running as FPM) |
…-wizard [FIX] Shows the labels in New Content Wizard again
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
The text was updated successfully, but these errors were encountered: