function history_user_cancel

Same name in other branches
  1. 9 core/modules/history/history.module \history_user_cancel()
  2. 8.9.x core/modules/history/history.module \history_user_cancel()

Implements hook_user_cancel().

File

core/modules/history/history.module, line 168

Code

function history_user_cancel($edit, UserInterface $account, $method) {
    switch ($method) {
        case 'user_cancel_reassign':
            \Drupal::database()->delete('history')
                ->condition('uid', $account->id())
                ->execute();
            break;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.