function shortcut_user_delete

Same name and namespace in other branches
  1. 9 core/modules/shortcut/shortcut.module \shortcut_user_delete()

Implements hook_ENTITY_TYPE_delete().

File

core/modules/shortcut/shortcut.module, line 400

Code

function shortcut_user_delete(EntityInterface $entity) {
  // Clean up shortcut set mapping of removed user account.
  \Drupal::entityTypeManager()->getStorage('shortcut_set')
    ->unassignUser($entity);
}

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