mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:37:33 -05:00 
			
		
		
		
	Multi-db fix
This commit is contained in:
		
							parent
							
								
									465fd29566
								
							
						
					
					
						commit
						8ee9fa5c89
					
				@ -87,9 +87,13 @@ class LookupModel extends Eloquent
 | 
			
		||||
                $providerId = substr($value, 0, 1);
 | 
			
		||||
                $oauthId = substr($value, 2);
 | 
			
		||||
                $isFound = $entity::where('oauth_provider_id', '=', $providerId)
 | 
			
		||||
                                ->where('oauth_user_id', '=', $oauthId)->first();
 | 
			
		||||
                                ->where('oauth_user_id', '=', $oauthId)
 | 
			
		||||
                                ->withTrashed()
 | 
			
		||||
                                ->first();
 | 
			
		||||
            } else {
 | 
			
		||||
                $isFound = $entity::where($field, '=', $value)->first();
 | 
			
		||||
                $isFound = $entity::where($field, '=', $value)
 | 
			
		||||
                                ->withTrashed()
 | 
			
		||||
                                ->first();
 | 
			
		||||
            }
 | 
			
		||||
            if (! $isFound) {
 | 
			
		||||
                abort("Looked up {$className} not found: {$field} => {$value}");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user