Welcome Guest, Not a member yet? Register   Sign In
Auth Shield and multilanguage
#1

Hello all,
I use SHIELD for authorization
My application is multilingual
The [users] table has a [multi] column
How do I set a session from the [multi] column after logging in.
I use entry in:
PHP Code:
BaseController.php
//...

public function initController(RequestInterface $requestResponseInterface $responseLoggerInterface $logger)
{
    // Do Not Edit This Line
    parent::initController($request$response$logger);

    // Add these lines
    $session = \Config\Services::session();
    $language = \Config\Services::language();
    $language->setLocale($session->lang);
}
//... 
Thank you
Reply


Messages In This Thread
Auth Shield and multilanguage - by kaziul - 06-05-2025, 12:37 AM
RE: Auth Shield and multilanguage - by InsiteFX - 06-05-2025, 11:12 PM
RE: Auth Shield and multilanguage - by kaziul - 06-07-2025, 05:34 AM
RE: Auth Shield and multilanguage - by grimpirate - 06-10-2025, 03:03 PM
RE: Auth Shield and multilanguage - by InsiteFX - 06-20-2025, 02:48 AM
RE: Auth Shield and multilanguage - by grimpirate - 06-20-2025, 09:01 AM
RE: Auth Shield and multilanguage - by InsiteFX - 06-20-2025, 09:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB