You are here

protected function BatchGenerator::loadAccount in User Merge 2.x

Load user.

Parameters

int $uid: User id.

Return value

\Drupal\Core\Entity\EntityInterface User entity.

Throws

\Drupal\usermerge\Exception\UserMergeException

2 calls to BatchGenerator::loadAccount()
BatchGenerator::performActionProcess in src/BatchGenerator.php
Runs batch steps for action plugin.
BatchGenerator::performPropertyProcess in src/BatchGenerator.php
Runs batch steps for property plugin.

File

src/BatchGenerator.php, line 231

Class

BatchGenerator
Class BatchGenerator.

Namespace

Drupal\usermerge

Code

protected function loadAccount($uid) {
  $user = $this->userStorage
    ->load($uid);
  if (!$user instanceof UserInterface) {
    throw new UserMergeException('Cant not find user');
  }
  return $user;
}