You are here

function revision_scheduler_user_cancel in Revision scheduler 7

Implements hook_user_cancel().

File

./revision_scheduler.module, line 220

Code

function revision_scheduler_user_cancel($edit, $account, $method) {
  switch ($method) {
    case 'user_cancel_reassign':

      // Reassign scheduled operations to the anonymous user.
      db_update('revision_scheduler')
        ->fields(array(
        'uid' => 0,
      ))
        ->condition('uid', $account->uid)
        ->execute();
      break;
  }
}