You are here

function history_user_delete in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/history/history.module \history_user_delete()
  2. 9 core/modules/history/history.module \history_user_delete()

Implements hook_ENTITY_TYPE_delete() for user entities.

File

core/modules/history/history.module, line 183
Records which users have read which content.

Code

function history_user_delete($account) {
  \Drupal::database()
    ->delete('history')
    ->condition('uid', $account
    ->id())
    ->execute();
}