mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Null if blank on user import
This commit is contained in:
parent
295a68bb7a
commit
304fce73fc
|
@ -316,8 +316,8 @@ abstract class Importer
|
|||
$user->last_name = $user_array['last_name'];
|
||||
$user->username = $user_array['username'];
|
||||
$user->email = $user_array['email'];
|
||||
$user->manager_id = $user_array['manager_id'] ?? false;
|
||||
$user->department_id = $user_array['department_id'] ?? false;
|
||||
$user->manager_id = $user_array['manager_id'] ?? null;
|
||||
$user->department_id = $user_array['department_id'] ?? null;
|
||||
$user->activated = $user_array['activated'];
|
||||
$user->password = $this->tempPassword;
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ class UserImporter extends ItemImporter
|
|||
\Log::debug('UserImporter.php Activated fetchHumanBoolean: '. $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')));
|
||||
|
||||
$this->item['employee_num'] = $this->findCsvMatch($row, 'employee_num');
|
||||
$this->item['department_id'] = $this->createOrFetchDepartment($this->findCsvMatch($row, 'department'));
|
||||
$this->item['manager_id'] = $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name'));
|
||||
$this->item['department_id'] = $this->createOrFetchDepartment($this->findCsvMatch($row, 'department')) ?? null;
|
||||
$this->item['manager_id'] = $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) ?? null;
|
||||
|
||||
|
||||
$user = User::where('username', $this->item['username'])->first();
|
||||
|
|
Loading…
Reference in a new issue