eZ Systems changed the way how logins are handled a few versions ago (versions > 5.3).

If your application still uses the legacy stack and you are using your own login module in the old stack you might have a problem: the new eZ (and Symfony) version will not login the user on the Symfony stack.

If you want to login a user in the new stack as well as in the legacy stack this solution in eZ 4 might help:

 $userId =  = 1224;
 $container = ezpKernel::instance()->getServiceContainer();
 try {
      
     $repository = $container->get('ezpublish.api.repository');
     $userService = $repository->getUserService();
     $ezUser = $userService->loadUser($userId);
     if ($ezUser) {
            $user = new CoreUser($ezUser);
            $providerKey = 'ezpublish_front';
            $token = new UsernamePasswordToken($user, null, $providerKey);

            $securityContextService = $container->get('security.context');
            $securityContextService->setToken($token);

            $repository->setCurrentUser($ezUser);
    } else {
            eZDebug::writeError('User with id '.$userId.' in new stack not found, login falied',__METHOD__);
    }
} catch (\Exception $e) {
     eZDebug::writeError("Exception while trying to login on new stack: ". $e->getMessage());
 }
https://blog.silversolutions.de/wp-content/uploads/2018/12/ez_dummy.pnghttps://blog.silversolutions.de/wp-content/uploads/2018/12/ez_dummy-150x150.pngFrank DegeB2B.technologiePraxis,Symfony,Tipps & TrickseZ Systems changed the way how logins are handled a few versions ago (versions > 5.3). If your application still uses the legacy stack and you are using your own login module in the old stack you might have a problem: the new eZ (and Symfony) version will not login the user...Die e-Commerce B2B Experten bloggen über Händler-Shops, ERP, PIM und das integrierte CMS eZ Publish