UserPicture.php in Zircon Profile 8.0
File
core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php
View source
<?php
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class UserPicture extends DrupalSqlBase {
public function query() {
$query = $this
->select('users', 'u')
->condition('picture', '', '<>')
->fields('u', array(
'uid',
'access',
'picture',
))
->orderBy('access');
return $query;
}
public function fields() {
return array(
'uid' => 'Primary Key: Unique user ID.',
'access' => 'Timestamp for previous time user accessed the site.',
'picture' => "Path to the user's uploaded picture.",
);
}
public function getIds() {
$ids['uid']['type'] = 'integer';
return $ids;
}
}