UserUpdate8002.php in Zircon Profile 8.0
File
core/modules/user/src/Plugin/migrate/process/UserUpdate8002.php
View source
<?php
namespace Drupal\user\Plugin\migrate\process;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class UserUpdate8002 extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$rid = $row
->getSourceProperty('rid');
$map = array(
1 => 'anonymous',
2 => 'authenticated',
);
return isset($map[$rid]) ? $map[$rid] : $value;
}
}