mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 07:57:33 -05:00 
			
		
		
		
	Minor Clean up
This commit is contained in:
		
							parent
							
								
									970cf417cc
								
							
						
					
					
						commit
						a1e9de5807
					
				@ -58,9 +58,6 @@ class PasswordProtection
 | 
				
			|||||||
            $google = new Google();
 | 
					            $google = new Google();
 | 
				
			||||||
            $user = $google->getTokenResponse(request()->header('X-API-OAUTH-PASSWORD'));
 | 
					            $user = $google->getTokenResponse(request()->header('X-API-OAUTH-PASSWORD'));
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            nlog("user");
 | 
					 | 
				
			||||||
            nlog($user);
 | 
					 | 
				
			||||||
            
 | 
					 | 
				
			||||||
            if (is_array($user)) {
 | 
					            if (is_array($user)) {
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                $query = [
 | 
					                $query = [
 | 
				
			||||||
@ -68,8 +65,6 @@ class PasswordProtection
 | 
				
			|||||||
                    'oauth_provider_id'=> 'google'
 | 
					                    'oauth_provider_id'=> 'google'
 | 
				
			||||||
                ];
 | 
					                ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                nlog($query);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                //If OAuth and user also has a password set  - check both
 | 
					                //If OAuth and user also has a password set  - check both
 | 
				
			||||||
                if ($existing_user = MultiDB::hasUser($query) && auth()->user()->company()->oauth_password_required && auth()->user()->has_password && Hash::check(auth()->user()->password, $request->header('X-API-PASSWORD'))) {
 | 
					                if ($existing_user = MultiDB::hasUser($query) && auth()->user()->company()->oauth_password_required && auth()->user()->has_password && Hash::check(auth()->user()->password, $request->header('X-API-PASSWORD'))) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -430,8 +430,6 @@ class Import implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    private function transformCompanyData(array $data): array
 | 
					    private function transformCompanyData(array $data): array
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        nlog("pre transformed");
 | 
					 | 
				
			||||||
        nlog($data['settings']);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $company_settings = CompanySettings::defaults();
 | 
					        $company_settings = CompanySettings::defaults();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -455,8 +453,6 @@ class Import implements ShouldQueue
 | 
				
			|||||||
            $data['settings'] = $company_settings;
 | 
					            $data['settings'] = $company_settings;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        nlog("transformed Settings");
 | 
					 | 
				
			||||||
        nlog($data['settings']);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $data;
 | 
					        return $data;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user