1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-23 14:56:51 +02:00

Added support for cookie domain

This commit is contained in:
Derixithy
2016-11-07 20:14:52 +01:00
parent 2d9e959bf2
commit 3897df4436
3 changed files with 10 additions and 4 deletions

View File

@@ -150,7 +150,7 @@ class SessionHandlerDB extends WireSessionHandler implements Module, Configurabl
$query = $database->prepare("DELETE FROM `$table` WHERE id=:id");
$query->execute(array(":id" => $id));
$secure = $this->wire('config')->sessionCookieSecure ? (bool) $this->config->https : false;
setcookie(session_name(), '', time()-42000, '/', null, $secure, true);
setcookie(session_name(), '', time()-42000, '/', $this->config->sessionCookieDomain, $secure, true);
return true;
}