You are here

function masquerade_cron in Masquerade 6

Same name and namespace in other branches
  1. 5 masquerade.module \masquerade_cron()
  2. 7 masquerade.module \masquerade_cron()

Implementation of hook_cron()

Cleanup masquerade records where people didn't use the switch back link that would have cleanly removed the user switch record.

File

./masquerade.module, line 58
masquerade.module

Code

function masquerade_cron() {

  // see http://drupal.org/node/268487 before modifying this query
  db_query('DELETE FROM {masquerade} WHERE sid NOT IN (SELECT s.sid FROM {sessions} AS s)');
}