public function Session::migrate

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

@api

Parameters

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

integer $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.

Return value

Boolean True if session migrated, false if error.

Overrides SessionInterface::migrate

1 call to Session::migrate()
Session::invalidate in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php
Invalidates the current session.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php, line 174

Class

Session
Session.

Namespace

Symfony\Component\HttpFoundation\Session

Code

public function migrate($destroy = false, $lifetime = null) {
  return $this->storage
    ->regenerate($destroy, $lifetime);
}