protected function MongodbSessionManager::migrateStoredSession in MongoDB 8
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().
Overrides SessionManager::migrateStoredSession
File
- mongodb_user/
src/ MongodbSessionManager.php, line 38 - Contains \Drupal\mongodb_user\MongodbSessionManager.
Class
Namespace
Drupal\mongodb_userCode
protected function migrateStoredSession($old_session_id) {
$criteria = [
'sid' => Crypt::hashBase64($old_session_id),
];
$newobj = array(
'sid' => Crypt::hashBase64($this
->getId()),
);
$this->mongo
->get('sessions')
->update($criteria, $newobj);
}