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

Breadcrumb

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

function MetadataBag::stampNew

Same name in this branch
  1. 11.1.x vendor/symfony/http-foundation/Session/Storage/MetadataBag.php \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag::stampNew()

Overrides MetadataBag::stampNew

File

core/lib/Drupal/Core/Session/MetadataBag.php, line 55

Class

MetadataBag
Provides a container for application specific session metadata.

Namespace

Drupal\Core\Session

Code

public function stampNew($lifetime = NULL) : void {
    parent::stampNew($lifetime);
    // Set the token seed immediately to avoid a race condition between two
    // simultaneous requests without a seed.
    $this->setCsrfTokenSeed(Crypt::randomBytesBase64());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal