public function DisqusComment::prepareRow in Disqus 8
Adds additional data to the row.
Parameters
\Drupal\migrate\Row $row: The row object.
Return value
bool FALSE if this row needs to be skipped.
Overrides SourcePluginBase::prepareRow
File
- src/
Plugin/ migrate/ source/ DisqusComment.php, line 125
Class
- DisqusComment
- Disqus comment source using disqus-api.
Namespace
Drupal\disqus\Plugin\migrate\sourceCode
public function prepareRow(Row $row) {
$row
->setSourceProperty('uid', 0);
$email = $row
->getSourceProperty('email');
$user = $this->entityTypeManager
->getStorage('user')
->getQuery()
->condition('mail', $email)
->execute();
if ($user) {
$row
->setSourceProperty('uid', key($user));
}
return parent::prepareRow($row);
}