mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 12:33:22 +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
c181e6779e
commit
51a4c845f1
|
@ -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']))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user