mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
commit
1f1e366903
@ -165,8 +165,11 @@ class TwilioController extends BaseController
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
$user->google_2fa_secret = '';
|
||||
$user->sms_verification_code = '';
|
||||
|
@ -26,7 +26,7 @@ class UpdateAccountRequest extends Request
|
||||
*/
|
||||
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',
|
||||
'wnpop.com',
|
||||
'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('eloquent.updated: App\Models\Invoice', $this->invoice);
|
||||
|
||||
$transaction = [
|
||||
'invoice' => $this->invoice->transaction_event(),
|
||||
'payment' => [],
|
||||
|
@ -67,6 +67,22 @@ class TriggeredActions extends AbstractService
|
||||
$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)
|
||||
event('eloquent.updated: App\Models\Invoice', $this->invoice);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user