Fix manager id if no manager is given in importer

This commit is contained in:
snipe 2018-11-07 17:33:27 -08:00
parent 192aa9eb71
commit f2478d813c

View file

@ -266,6 +266,7 @@ abstract class Importer
$user_array = [
'full_name' => $this->findCsvMatch($row, "full_name"),
'email' => $this->findCsvMatch($row, "email"),
'manager_id'=> $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) ? $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) : null,
'username' => $this->findCsvMatch($row, "username"),
'activated' => $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')),
];