_drupal_clean_form_sessions
Definition
_drupal_clean_form_sessions()
includes/form.inc, line 106
Description
Remove form information that's at least a day old from the $_SESSION['form'] array.
Related topics
| Name | Description |
|---|---|
| Form generation | Functions to enable the processing and display of HTML forms. |
Code
<?php
function _drupal_clean_form_sessions() {
if (isset($_SESSION['form'])) {
foreach ($_SESSION['form'] as $build_id => $data) {
if ($data['timestamp'] < (time() - 84600)) {
unset($_SESSION['form'][$build_id]);
}
}
}
}
?> 