Actions
Bug #88290
closed$GLOBALS['TSFE']->loginUser is true for not login user.
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2019-05-07
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
7.2
Tags:
frontendLogin feUser sysext
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Remote Sprint
Description
Hello!
I have problem with TSFE login user
If we add usergroup for anonymous session, we still have anonymous session but typo3 think that is true login session $GLOBALS['TSFE']->loginUser is true
example record from fe_session which are visible as loginUser:
web/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
Problem is with this if:
if (is_array($this->fe_user->user) && !empty($this->fe_user->groupData['uid'])) { // global flag! $this->loginUser = true; $this->gr_list = '0,-2'; $gr_array = $this->fe_user->groupData['uid']; } else { $this->loginUser = false;
This code set true if any session is present (even anonymous!) and user group is present.
That is incorrect IMO and correct if condition should be:
if (is_array($this->fe_user->user) && !empty($this->fe_user->groupData['uid']) && !$this->fe_user->user['ses_anonymous'])
anonymous session is not loginUser session.
Files
Updated by Mathias Schreiber about 2 years ago
- Sprint Focus set to Remote Sprint
Updated by Simon Schaufelberger about 2 years ago
How can you add a usergroup to an anonymous session?
Updated by Larry Garfield about 2 years ago
- Status changed from New to Resolved
The loginUser property no longer exists in TSFE Controller, so I think this issue is no longer relevant.
Actions