You are here

private function Anonymizer::refetchUser in General Data Protection Regulation 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/gdpr_tasks/src/Anonymizer.php \Drupal\gdpr_tasks\Anonymizer::refetchUser()
  2. 8 modules/gdpr_tasks/src/Anonymizer.php \Drupal\gdpr_tasks\Anonymizer::refetchUser()

Re-fetches the user bypassing the cache.

Parameters

string $user_id: The ID of the user to fetch.

Return value

\Drupal\user\UserInterface The user that was fetched.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 call to Anonymizer::refetchUser()
Anonymizer::run in modules/gdpr_tasks/src/Anonymizer.php
Runs anonymization routines against a user.

File

modules/gdpr_tasks/src/Anonymizer.php, line 178

Class

Anonymizer
Anonymizes or removes field values for GDPR.

Namespace

Drupal\gdpr_tasks

Code

private function refetchUser($user_id) {
  return $this->entityTypeManager
    ->getStorage('user')
    ->loadUnchanged($user_id);
}