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 f51e29ff4c
commit 043aa0f2d9

View File

@ -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']))
); );
} }