function SessionManager::migrateStoredSession
Migrates the current session to a new session id.
Parameters
string $old_session_id: The old session ID. The new session ID is $this->getId().
1 call to SessionManager::migrateStoredSession()
- SessionManager::regenerate in core/
lib/ Drupal/ Core/ Session/ SessionManager.php
File
-
core/
lib/ Drupal/ Core/ Session/ SessionManager.php, line 337
Class
- SessionManager
- Manages user sessions.
Namespace
Drupal\Core\SessionCode
protected function migrateStoredSession($old_session_id) {
$fields = [
'sid' => Crypt::hashBase64($this->getId()),
];
$this->connection
->update('sessions')
->fields($fields)
->condition('sid', Crypt::hashBase64($old_session_id))
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.