Skip to content
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

AccessControlService can not detect logged in frontend user #93

Closed
lechenbauer opened this issue Feb 18, 2021 · 2 comments
Closed

AccessControlService can not detect logged in frontend user #93

lechenbauer opened this issue Feb 18, 2021 · 2 comments
Assignees
Labels

Comments

@lechenbauer
Copy link

AccessControlService->hasLoggedInFrontendUser always returns false, resulting in an error: "Return value of Thucke\ThRating\Domain\Model\Vote::getVoter() must be an instance of Thucke\ThRating\Domain\Model\Voter, null returned". But $GLOBALS['TSFE']->fe_user is filled correctly.

Changing line 111 from $context = GeneralUtility::makeInstance(Context::class, array());
to $context = GeneralUtility::makeInstance(Context::class); solved the problem for me.
https://github.com/thucke/TYPO3.ext.th_rating/blob/develop/Classes/Service/AccessControlService.php#L111

Using TYPO3 10.4.13, PHP 7.3 and th_rating version 1.8.2

@thucke
Copy link
Contributor

thucke commented Feb 20, 2021

@lechenbauer - thank you very much

@thucke thucke closed this as completed Feb 20, 2021
@lechenbauer
Copy link
Author

@thucke - thanks for your super fast response and the new release! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants