Skip to content

A free open source IT asset/license management system

Sets activated to 0 in UserImporter if the activated column isn’t set

snipe2632f730d1c5
diff --git a/app/Importer/UserImporter.php b/app/Importer/UserImporter.php
index 5d5461944e..bd5bbc1d5b 100644
--- a/app/Importer/UserImporter.php
+++ b/app/Importer/UserImporter.php
@@ -47,7 +47,7 @@ class UserImporter extends ItemImporter
$this->item['email'] = $this->findCsvMatch($row, 'email');
$this->item['phone'] = $this->findCsvMatch($row, 'phone_number');
$this->item['jobtitle'] = $this->findCsvMatch($row, 'jobtitle');
- $this->item['activated'] = $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated'));
+ $this->item['activated'] = ($this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')) == 1) ? '1' : 0;
\Log::debug('UserImporter.php Activated: '.$this->findCsvMatch($row, 'activated'));
\Log::debug('UserImporter.php Activated fetchHumanBoolean: '. $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')));