예제 #1
0
 /**
  * {@inheritdoc}
  * @throws \Drupal\migrate\MigrateException
  */
 public function import(Row $row, array $old_destination_id_values = array())
 {
     // Do not overwrite the root account password.
     if ($row->getDestinationProperty('uid') == 1) {
         $row->removeDestinationProperty('pass');
     }
     return parent::import($row, $old_destination_id_values);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  * @throws \Drupal\migrate\MigrateException
  */
 public function import(Row $row, array $old_destination_id_values = array())
 {
     if ($this->password) {
         if ($this->password instanceof MigratePassword) {
             $this->password->enableMd5Prefixing();
         } else {
             throw new MigrateException('Password service has been altered by another module, aborting.');
         }
     }
     // Do not overwrite the root account password.
     if ($row->getDestinationProperty('uid') == 1) {
         $row->removeDestinationProperty('pass');
     }
     $ids = parent::import($row, $old_destination_id_values);
     if ($this->password) {
         $this->password->disableMd5Prefixing();
     }
     return $ids;
 }