mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 01:17:30 -05:00 
			
		
		
		
	Changes to CompanyImport logic - allow multiple users to be imported - however we prevent them from logging in if their plan isn't Enterprise
This commit is contained in:
		
							parent
							
								
									1397c9ab1c
								
							
						
					
					
						commit
						d2d6a9fe5a
					
				@ -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'){
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user