Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SessionInterface.php

function SessionInterface::migrate

Migrates the current session to a new session id while maintaining all session attributes.

Parameters

bool $destroy Whether to delete the old session or leave it to garbage collection:

int|null $lifetime Sets the cookie lifetime for the session cookie. A null value: will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.

1 method overrides SessionInterface::migrate()
Session::migrate in vendor/symfony/http-foundation/Session/Session.php
Migrates the current session to a new session id while maintaining all session attributes.

File

vendor/symfony/http-foundation/Session/SessionInterface.php, line 73

Class

SessionInterface
Interface for the session.

Namespace

Symfony\Component\HttpFoundation\Session

Code

public function migrate(bool $destroy = false, ?int $lifetime = null) : bool;
RSS feed
Powered by Drupal