OMOSde / contao-om-backend

Additional backend tools for Contao 4.4+
GNU Lesser General Public License v3.0
19 stars 5 forks source link

User returns NULL #72

Closed raynor84 closed 1 year ago

raynor84 commented 1 year ago

Hi,

using Contao 4.13.14 PHP 8.1.17

The code in the config: $objUser = System::getContainer()->get('security.helper')->getUser();

doesn't return a User, even if logged as admin.

I changed it to:

        $objUser = BackendUser::getInstance();
        $objUser->authenticate();

and now i get the Links shown in the Backend.

Could you have a look at it?

Kind regards

Stefan

OMOSde commented 1 year ago

Fixed in b37fd0858028e596f7bfb931ed9738c8f78afb0a