1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 14:51:19 +02: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:
Daniël Klabbers
2018-04-11 23:19:34 +02:00
committed by Toby Zerner
parent c181e6779e
commit 51a4c845f1

View File

@@ -40,7 +40,9 @@ class StartSession implements MiddlewareInterface
protected $config;
/**
* @param SessionHandlerInterface $handler
* @param CookieFactory $cookie
* @param ConfigRepository $config
*/
public function __construct(SessionHandlerInterface $handler, CookieFactory $cookie, ConfigRepository $config)
{
@@ -67,12 +69,10 @@ class StartSession implements MiddlewareInterface
private function makeSession(Request $request)
{
$cookieName = $this->cookie->getName($this->config['cookie']);
return new Store(
$cookieName,
$this->config['cookie'],
$this->handler,
array_get($request->getCookieParams(), $cookieName)
array_get($request->getCookieParams(), $this->cookie->getName($this->config['cookie']))
);
}