mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 00:17:30 -04:00 
			
		
		
		
	
						commit
						1f1e366903
					
				| @ -165,8 +165,11 @@ class TwilioController extends BaseController | |||||||
|          |          | ||||||
|         if($verification_check->status == 'approved'){ |         if($verification_check->status == 'approved'){ | ||||||
| 
 | 
 | ||||||
|             if($request->query('validate_only') == 'true') |             if($request->query('validate_only') == 'true'){ | ||||||
|  |                 $user->verified_phone_number = true; | ||||||
|  |                 $user->save(); | ||||||
|                 return response()->json(['message' => 'SMS verified'], 200); |                 return response()->json(['message' => 'SMS verified'], 200); | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             $user->google_2fa_secret = ''; |             $user->google_2fa_secret = ''; | ||||||
|             $user->sms_verification_code = ''; |             $user->sms_verification_code = ''; | ||||||
|  | |||||||
| @ -26,7 +26,7 @@ class UpdateAccountRequest extends Request | |||||||
|      */ |      */ | ||||||
|     public function authorize() |     public function authorize() | ||||||
|     { |     { | ||||||
|         return (auth()->user()->isAdmin() || auth()->user()->isOwner()) && ($this->account->id == auth()->user()->account_id); |         return (auth()->user()->isAdmin() || auth()->user()->isOwner()) && ($this->account->id == auth()->user()->token()->account_id); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  | |||||||
| @ -27,6 +27,7 @@ class BlackListRule implements Rule | |||||||
|         'superhostforumla.com', |         'superhostforumla.com', | ||||||
|         'wnpop.com', |         'wnpop.com', | ||||||
|         'dataservices.space', |         'dataservices.space', | ||||||
|  |         'karenkey.com', | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  | |||||||
| @ -251,6 +251,13 @@ class NinjaMailerJob implements ShouldQueue | |||||||
|                 ], |                 ], | ||||||
|             ]); |             ]); | ||||||
| 
 | 
 | ||||||
|  |             if(env($this->company->id . '_MAIL_FROM_ADDRESS')) | ||||||
|  |             { | ||||||
|  |             $this->nmo | ||||||
|  |                  ->mailable | ||||||
|  |                  ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); | ||||||
|  |              } | ||||||
|  | 
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -57,6 +57,8 @@ class HandleCancellation extends AbstractService | |||||||
| 
 | 
 | ||||||
|         event(new InvoiceWasCancelled($this->invoice, $this->invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); |         event(new InvoiceWasCancelled($this->invoice, $this->invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); | ||||||
| 
 | 
 | ||||||
|  |         event('eloquent.updated: App\Models\Invoice', $this->invoice); | ||||||
|  | 
 | ||||||
|         $transaction = [ |         $transaction = [ | ||||||
|             'invoice' => $this->invoice->transaction_event(), |             'invoice' => $this->invoice->transaction_event(), | ||||||
|             'payment' => [], |             'payment' => [], | ||||||
|  | |||||||
| @ -67,6 +67,22 @@ class TriggeredActions extends AbstractService | |||||||
|             $this->updated = false; |             $this->updated = false; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         if($this->request->has('save_default_footer') && $this->request->input('save_default_footer') == 'true') { | ||||||
|  |             $company = $this->invoice->company; | ||||||
|  |             $settings = $company->settings; | ||||||
|  |             $settings->invoice_footer = $this->invoice->footer; | ||||||
|  |             $company->settings = $settings; | ||||||
|  |             $company->save(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         if($this->request->has('save_default_terms') && $this->request->input('save_default_terms') == 'true') { | ||||||
|  |             $company = $this->invoice->company; | ||||||
|  |             $settings = $company->settings; | ||||||
|  |             $settings->invoice_terms = $this->invoice->terms; | ||||||
|  |             $company->settings = $settings; | ||||||
|  |             $company->save(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         if($this->updated) |         if($this->updated) | ||||||
|             event('eloquent.updated: App\Models\Invoice', $this->invoice); |             event('eloquent.updated: App\Models\Invoice', $this->invoice); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user