mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 03:57:32 -05:00 
			
		
		
		
	Fixes for account signup
This commit is contained in:
		
							parent
							
								
									41265e6483
								
							
						
					
					
						commit
						7edb45b64f
					
				@ -16,6 +16,7 @@ use App\Jobs\Account\CreateAccount;
 | 
				
			|||||||
use App\Models\Account;
 | 
					use App\Models\Account;
 | 
				
			||||||
use App\Models\CompanyUser;
 | 
					use App\Models\CompanyUser;
 | 
				
			||||||
use App\Transformers\CompanyUserTransformer;
 | 
					use App\Transformers\CompanyUserTransformer;
 | 
				
			||||||
 | 
					use App\Utils\TruthSource;
 | 
				
			||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
 | 
					use Illuminate\Foundation\Bus\DispatchesJobs;
 | 
				
			||||||
use Illuminate\Http\Response;
 | 
					use Illuminate\Http\Response;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -150,7 +151,11 @@ class AccountController extends BaseController
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $ct = CompanyUser::whereUserId(auth()->user()->id);
 | 
					        $ct = CompanyUser::whereUserId(auth()->user()->id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        config(['ninja.company_id' => $ct->first()->company->id]);
 | 
					            $truth = app()->make(TruthSource::class);
 | 
				
			||||||
 | 
					            $truth->setCompanyUser($ct->first());
 | 
				
			||||||
 | 
					            $truth->setUser(auth()->user());
 | 
				
			||||||
 | 
					            $truth->setCompany($ct->first()->company);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $this->listResponse($ct);
 | 
					        return $this->listResponse($ct);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user