W3cubDocs

/Drupal 8

function history_user_delete

history_user_delete($account)

Implements hook_ENTITY_TYPE_delete() for user entities.

File

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

Code

function history_user_delete($account) {
  db_delete('history')
    ->condition('uid', $account->id())
    ->execute();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!history!history.module/function/history_user_delete/8.1.x