1 |
73c403fc
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Dummy module implementing a page callback to create an anon session.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Implements hook_menu().
|
10 |
|
|
*/
|
11 |
|
|
function user_session_test_menu() {
|
12 |
|
|
$items = array();
|
13 |
|
|
$items['user_session_test_anon_session'] = array(
|
14 |
|
|
'page callback' => 'user_session_test_anon_session',
|
15 |
|
|
'access callback' => TRUE,
|
16 |
|
|
);
|
17 |
|
|
return $items;
|
18 |
|
|
}
|
19 |
|
|
|
20 |
|
|
/**
|
21 |
|
|
* Page callback.
|
22 |
|
|
*
|
23 |
|
|
* Creates an anonymous user session.
|
24 |
|
|
*/
|
25 |
|
|
function user_session_test_anon_session() {
|
26 |
|
|
$data = 'This dummy data will be stored in a user session.';
|
27 |
|
|
$_SESSION[__FUNCTION__] = $data;
|
28 |
|
|
return $data;
|
29 |
|
|
} |