
| Current Path : /var/www/html/rocksensor/web/core/modules/system/tests/modules/session_test/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/web/core/modules/system/tests/modules/session_test/session_test.module |
<?php
/**
* @file
* Test module.
*/
use Drupal\user\UserInterface;
/**
* Implements hook_user_login().
*/
function session_test_user_login(UserInterface $account) {
if ($account->getAccountName() == 'session_test_user') {
// Exit so we can verify that the session was regenerated
// before hook_user_login() was called.
exit;
}
// Add some data in the session for retrieval testing purpose.
\Drupal::request()->getSession()->set("session_test_key", "foobar");
}