function MetadataBag::stampNew
Same name in other branches
- 9 core/lib/Drupal/Core/Session/MetadataBag.php \Drupal\Core\Session\MetadataBag::stampNew()
- 11.x core/lib/Drupal/Core/Session/MetadataBag.php \Drupal\Core\Session\MetadataBag::stampNew()
phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn
Return value
void
File
-
core/
lib/ Drupal/ Core/ Session/ MetadataBag.php, line 58
Class
- MetadataBag
- Provides a container for application specific session metadata.
Namespace
Drupal\Core\SessionCode
public function stampNew($lifetime = NULL) {
parent::stampNew($lifetime);
// Set the token seed immediately to avoid a race condition between two
// simultaneous requests without a seed.
$this->setCsrfTokenSeed(Crypt::randomBytesBase64());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.