You are here

protected function FeedsUserProcessor::newEntity in Feeds 7.2

Creates a new user account in memory and returns it.

Overrides FeedsProcessor::newEntity

File

plugins/FeedsUserProcessor.inc, line 63
Contains FeedsUserProcessor.

Class

FeedsUserProcessor
Feeds processor plugin. Create users from feed items.

Code

protected function newEntity(FeedsSource $source) {
  $account = parent::newEntity($source);
  $account->uid = 0;
  $account->roles = array_filter($this->config['roles']);
  $account->status = $this->config['status'];
  $account->is_new = TRUE;
  return $account;
}