session_api.api.php

Hooks provided by Session API.

Functions

Namesort descending Description
hook_session_api_cleanup Allows modules to act upon Session IDs being deleted.

File

session_api.api.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by Session API.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Allows modules to act upon Session IDs being deleted.
  12. *
  13. * @param array $outdated_sids
  14. * An array with all the expired Session IDs that will be deleted.
  15. */
  16. function hook_session_api_cleanup($outdated_sids) {
  17. // Delete flags associated with outdated sessions.
  18. db_delete('flagging')->condition('sid', $outdated_sids)->execute();
  19. }
  20. /**
  21. * @} End of "addtogroup hooks".
  22. */