You are here

public function MultiStepStorage::getRetiredAccount in User Merge 2.x

Get retired account.

Return value

\Drupal\user\UserInterface|null Retired account.

Overrides MultiStepStorageInterface::getRetiredAccount

File

src/MultiStepStorage.php, line 97

Class

MultiStepStorage
Class MultiStepStorage.

Namespace

Drupal\usermerge

Code

public function getRetiredAccount() {
  $values = $this->store
    ->get('');
  if (!isset($values['retire'])) {
    return NULL;
  }
  $user = $this->userStorage
    ->load($values['retire']);
  if ($user instanceof UserInterface) {
    return $user;
  }
  return NULL;
}