Optimize loading of frontend user groups
In TSFE frontend user groups are tried to be loaded. However, if there's no active frontend user or no request for simulating a frontend user group, it does not make any sense to call tslib_fe->initUserGroups().
(issue imported from #M11038)
#2 Updated by Rupert Germann about 11 years ago
doesn't work - please revert:
the call to initUserGroups() calls fe_user->fetchGroupData() which is indeed
an expensive operation but it also sets the vars "$this->loginUser"
especially gr_list is used at many places and it is not set anymore now.
One effect of this missing gr_list is, that the complete "enableFields"
stuff works differently -> means f.e. that a function like
cobj->getTreeList seems to ignore the "$depth" parameter. This is caused by
a call to $GLOBALS['TSFE']->checkEnableFields() which expects a gr_list.