Feeds User Processor

  protected function entitySave($account) {
    if ($this->config['defuse_mail']) {
      $account->mail = $account->mail . '_test';
    }
    $account->roles = $account->roles + array_filter($this->config['roles']); //bikim
    user_save($account, (array) $account);
    if ($account->uid && !empty($account->openid)) {
      $authmap = array(
        'uid' => $account->uid,
        'module' => 'openid',
        'authname' => $account->openid,
      );
      if (SAVED_UPDATED != drupal_write_record('authmap', $authmap, array('uid', 'module'))) {
        drupal_write_record('authmap', $authmap);
      }
    }
  }
  protected function entityLoad(FeedsSource $source, $uid) {
    // return user_load($uid);
	$user = user_load($uid);
    if (!isset($source->pass)) {
    	unset($user->pass);
    }
    return $user; //bikim - No replace password.
  }

Posted in Drupal