You are here

public function UserMerger::applyAction in User Merge 2.x

Applies the action to take on the user account being retired.

Parameters

string $plugin_id: The action plugin id to use.

\Drupal\user\UserInterface $retire_user: The user being retired after the merge is complete.

\Drupal\user\UserInterface $retain_user: The user being retained after the merge is complete.

Overrides UserMergerInterface::applyAction

1 call to UserMerger::applyAction()
UserMerger::merge in src/UserMerger.php
Merges two user accounts.

File

src/UserMerger.php, line 56

Class

UserMerger
A service for merging two Drupal user accounts.

Namespace

Drupal\usermerge

Code

public function applyAction($plugin_id, UserInterface $retire_user, UserInterface $retain_user) {
  $this->actionPluginManager
    ->createInstance($plugin_id)
    ->process($retire_user, $retain_user);
}