Conditions | 3 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function prepareRow(Row $row) { |
||
16 | // Ensure the password is hashed. |
||
17 | if ($value = $row->getSourceProperty('Pass')) { |
||
18 | $password = \Drupal::service('password')->hash($value); |
||
19 | $row->setSourceProperty('Pass', $password); |
||
20 | } |
||
21 | // Set up the roles. |
||
22 | if ($value = $row->getSourceProperty('Roles')) { |
||
23 | $row->setSourceProperty('Roles', explode(', ', $value)); |
||
24 | } |
||
27 |