mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-30 02:52:22 +08:00
Remove cookie on pre install page
This commit is contained in:
parent
fc0079726e
commit
e36e287669
1 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,14 @@ use Monolog\Logger;
|
|||
require __DIR__ . '/../config/bootstrap.php';
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
$log = new Logger('install.log');
|
||||
$sessionName = 'SCRMSESSID';
|
||||
$sessionId = $_COOKIE[$sessionName] ?? false;
|
||||
if (!empty($sessionId) && session_status() === PHP_SESSION_ACTIVE) {
|
||||
session_destroy();
|
||||
|
||||
}
|
||||
setcookie($sessionName, false, 1, '/');
|
||||
|
||||
$log->pushHandler(new StreamHandler('../logs/install.log', Logger::DEBUG));
|
||||
(new InstallPreChecks($log))->setupTwigTemplate();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue