You are here

function _session_test_id in Drupal 7

Menu callback: print the current session ID.

1 string reference to '_session_test_id'
session_test_menu in modules/simpletest/tests/session_test.module
Implements hook_menu().

File

modules/simpletest/tests/session_test.module, line 120

Code

function _session_test_id() {

  // Set a value in $_SESSION, so that drupal_session_commit() will start
  // a session.
  $_SESSION['test'] = 'test';
  drupal_session_commit();
  return 'session_id:' . session_id() . "\n";
}