mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +08:00
fixes log in without remember on master (#1402)
* fixes log in without remember on master * Fix cookie name by removing prefix from session name rather than in CookieFactory * Inline temp variable
This commit is contained in:
parent
f51e29ff4c
commit
043aa0f2d9
|
@ -40,7 +40,9 @@ class StartSession implements MiddlewareInterface
|
||||||
protected $config;
|
protected $config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param SessionHandlerInterface $handler
|
||||||
* @param CookieFactory $cookie
|
* @param CookieFactory $cookie
|
||||||
|
* @param ConfigRepository $config
|
||||||
*/
|
*/
|
||||||
public function __construct(SessionHandlerInterface $handler, CookieFactory $cookie, ConfigRepository $config)
|
public function __construct(SessionHandlerInterface $handler, CookieFactory $cookie, ConfigRepository $config)
|
||||||
{
|
{
|
||||||
|
@ -67,12 +69,10 @@ class StartSession implements MiddlewareInterface
|
||||||
|
|
||||||
private function makeSession(Request $request)
|
private function makeSession(Request $request)
|
||||||
{
|
{
|
||||||
$cookieName = $this->cookie->getName($this->config['cookie']);
|
|
||||||
|
|
||||||
return new Store(
|
return new Store(
|
||||||
$cookieName,
|
$this->config['cookie'],
|
||||||
$this->handler,
|
$this->handler,
|
||||||
array_get($request->getCookieParams(), $cookieName)
|
array_get($request->getCookieParams(), $this->cookie->getName($this->config['cookie']))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user