You are here

protected function SessionManager::migrateStoredSession in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\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() unless $new_insecure_session_id is not empty.

1 call to SessionManager::migrateStoredSession()
SessionManager::regenerate in core/lib/Drupal/Core/Session/SessionManager.php
Regenerates id that represents this storage.

File

core/lib/Drupal/Core/Session/SessionManager.php, line 337
Contains \Drupal\Core\Session\SessionManager.

Class

SessionManager
Manages user sessions.

Namespace

Drupal\Core\Session

Code

protected function migrateStoredSession($old_session_id) {
  $fields = array(
    'sid' => Crypt::hashBase64($this
      ->getId()),
  );
  $this->connection
    ->update('sessions')
    ->fields($fields)
    ->condition('sid', Crypt::hashBase64($old_session_id))
    ->execute();
}