Project

General

Profile

Bug #88290

Updated by Simon Schaufelberger about 2 years ago

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: 

 !Selection_999.png! !Selection_999(316).png! 

 <pre> 
 web/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 
 </pre> 

 Problem is with this if:  
 <pre>    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; 
 </pre> 

 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: 
 <pre> 
 if (is_array($this->fe_user->user) && !empty($this->fe_user->groupData['uid']) && !$this->fe_user->user['ses_anonymous']) 
 </pre> 

 anonymous session is not loginUser session.

Back