Merge pull request #6013 from turbo124/v5-develop

Changes to CompanyImport logic - allow multiple users to be imported …
This commit is contained in:
David Bomba 2021-06-14 17:09:21 +10:00 committed by GitHub
commit f2e29bdcf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,7 @@ class CompanyImport implements ShouldQueue
if(count($backup_users) > 1){
// $this->message = 'Only one user can be in the import for a Free Account';
// $this->pre_flight_checks_pass = false;
$this->force_user_coalesce = true;
//$this->force_user_coalesce = true;
}
nlog("backup users email = " . $backup_users[0]->email);
@ -227,7 +227,7 @@ class CompanyImport implements ShouldQueue
if(count($backup_users) == 1 && $this->company_owner->email != $backup_users[0]->email) {
// $this->message = 'Account emails do not match. Account owner email must match backup user email';
// $this->pre_flight_checks_pass = false;
$this->force_user_coalesce = true;
// $this->force_user_coalesce = true;
}
$backup_users_emails = array_column($backup_users, 'email');
@ -243,7 +243,7 @@ class CompanyImport implements ShouldQueue
if($this->account->plan == 'pro'){
// $this->message = 'Pro plan is limited to one user, you have multiple users in the backup file';
// $this->pre_flight_checks_pass = false;
$this->force_user_coalesce = true;
// $this->force_user_coalesce = true;
}
if($this->account->plan == 'enterprise'){