Actions
Bug #99710
closedEXT:felogin - Show Cookie Warning doesn't work
Start date:
2023-01-25
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
felogin,cookie,warning
Complexity:
Is Regression:
Sprint Focus:
Description
Cookie warning is never shown.
$this->showCookieWarning
is set "true" only if user is logged in and if warning is required(?), here
https://github.com/TYPO3/typo3/blob/92b8a70a855eaccce3fa500ffab9c5a340e98f41/typo3/sysext/felogin/Classes/Controller/LoginController.php#L70
but
$this->userService->cookieWarningRequired()
uses
$this->feUser->isCookieSet()
isCookieSet()
is always "true", if the user is logged in,
because
$this->setCookie
is always "true", if the user is logged in.
The one and only way to check, if cookies are disabled (by the browser), is to check $_COOKIE array.
I think there is no way to check whether the cookies are disabled or not, until the request is fully executed.
One way would be to check (and show cookie warning message) via ajax, just after the page has loaded.
Actions