mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9327 from kinglozzer/9259-session-restart
FIX: Session::restart() didn't correctly restart session (fixes #9259)
This commit is contained in:
commit
92acc764f7
@ -226,9 +226,7 @@ class Session
|
||||
if (isset($this->data['HTTP_USER_AGENT'])) {
|
||||
if ($this->data['HTTP_USER_AGENT'] !== $this->userAgent($request)) {
|
||||
$this->clearAll();
|
||||
$this->destroy();
|
||||
$this->started = false;
|
||||
$this->start($request);
|
||||
$this->restart($request);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -241,7 +239,7 @@ class Session
|
||||
public function restart(HTTPRequest $request)
|
||||
{
|
||||
$this->destroy();
|
||||
$this->init($request);
|
||||
$this->start($request);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -369,6 +367,7 @@ class Session
|
||||
// http://nz1.php.net/manual/en/function.session-destroy.php
|
||||
unset($_SESSION);
|
||||
$this->data = null;
|
||||
$this->started = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user