Search code examples
phptypo3-4.5

typo3 check all backend user( not only admin)


in my backend I have admin and managers. Managers have short functional. But I want show some content ALL backend users, not only admins. I use $this->tsfe->beUserLogin construction, and this content visible only for admins.

UPD I have FE module, it placed into several page. In my extension I have .php and .tpl files. I transmit $variable=$GLOBALS['TSFE']->beUserLogin from .php to .tpl file, and in .tpl I have construction if(variable) <div>...</div>. In the page I don't have div, if I don't have admin account. if($GLOBALS['TSFE']->beUserLogin) die('Logged BE user'); if I am admin, it's work, but for another users script continue work.The managers have access only to folder with content element, but don't have to page, where this content placed.


Solution

  • The common backend user (not admin) need to have the access to the page at least possibility to see it on the Page tree (in WEB>Access module at least first option (ShowPage) must be marked for the group of the user)

    Otherwise the $GLOBALS['TSFE']->beUserLogin var considers there's no logged BE user (or there's no BE user allowed to see this page as an admin).