Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTR: delete unusued code #397

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions Components/SessionManager/SessionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,6 @@ public function extendSessionLifespan($days)
# it causes the finish-page to have missing data, like missing address.
# it does not make any sense, but its a deep logic of shopware or the session handling
# and we have to remove it for now and stick with the default server and system configuration.
return;

$session = $this->container->get('session');

# write session data and commit database transaction to avoid locks
# @see Shopware\Components\Session\PdoSessionHandler::close()
if (method_exists($session, 'save')) {
$session->save();
}

session_write_close();


$sessionId = $this->getSessionId();
$lifetimeSeconds = $days * 24 * 60 * 60;

ini_set('session.gc_maxlifetime', $lifetimeSeconds);

/** @var QueryBuilder $qb */
$qb = $this->connection->createQueryBuilder();

$qb->update('s_core_sessions')
->set('expiry', ':expiry')
->where($qb->expr()->eq('id', ':id'))
->setParameter(':expiry', time() + $lifetimeSeconds)
->setParameter(':id', $sessionId);

$qb->execute();
}

/**
Expand Down
Loading