Are the data stored with the tempstore.private and tempstore.shared services expected to be removed when the user account is deleted?

by kiamlaluno   Last Updated June 15, 2018 13:07 PM

Both the tempstore.private and tempstore.shared services store data which have an associated owner; for logged-in users, that is the user ID.

When an account is deleted, are the data having that user ID as owner removed?

I looked at User::postDelete(), but there isn't code for that.

public static function postDelete(EntityStorageInterface $storage, array $entities) {
  parent::postDelete($storage, $entities);
  $uids = array_keys($entities);
  \Drupal::service('user.data')
    ->delete(NULL, $uids);
}

It could be I didn't look at the correct class, or the code to delete those data is still missing from Drupal core.

Should I expect the data stored with the tempstore.private and tempstore.shared services be immediately deleted after a user account is deleted?

Tags : users


Related Questions




Create A Sort Features In Drupal

Updated April 04, 2015 15:03 PM

Generating user accounts programatically

Updated April 22, 2015 07:03 AM

Can admins create new accounts without passwords?

Updated February 21, 2016 01:03 AM