You are here

function hook_session_api_cleanup in Session API 7

Allows modules to act upon Session IDs being deleted.

Parameters

array $outdated_sids: An array with all the expired Session IDs that will be deleted.

2 invocations of hook_session_api_cleanup()
session_api_cron in ./session_api.module
Implements hook_cron().
session_api_settings_form in ./session_api.admin.inc
Session API admin settings form.

File

./session_api.api.php, line 19
Hooks provided by Session API.

Code

function hook_session_api_cleanup($outdated_sids) {

  // Delete flags associated with outdated sessions.
  db_delete('flagging')
    ->condition('sid', $outdated_sids)
    ->execute();
}