Spaces:
No application file
No application file
File size: 611 Bytes
d2897cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?php
namespace Mautic\CoreBundle\Loader\EnvVars;
use Symfony\Component\HttpFoundation\ParameterBag;
class SessionEnvVars implements EnvVarsInterface
{
public static function load(ParameterBag $config, ParameterBag $defaultConfig, ParameterBag $envVars): void
{
// Set the session name
$localConfigFile = $defaultConfig->get('local_config_path', uniqid());
$secretKey = $config->get('secret_key');
$key = $secretKey ?: 'mautic';
$sessionName = md5(md5($localConfigFile).$key);
$envVars->set('MAUTIC_SESSION_NAME', $sessionName);
}
}
|